From 4ef7c7ac2dce1cd2f9d78ee51538cc13f4cf606e Mon Sep 17 00:00:00 2001 From: Federico Medina Date: Wed, 29 Jun 2016 19:08:58 -0400 Subject: [PATCH] fix: Add crossorigin attribute to script HTML tags The Problem: When an error occurs in a script that is not served by the default server spawned by karma, the stack trace gets lost and only the message "Script Error" is captured and reported back. This makes it hard to pin-point where the error originated from. The Solution: Add "crossorigin" attribute to generated script tags. Solution is inspired by this article: https://blog.getsentry.com/2016/05/17/what-is-script-error.html --- lib/middleware/karma.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleware/karma.js b/lib/middleware/karma.js index c9beec6bb..d3de85dfa 100644 --- a/lib/middleware/karma.js +++ b/lib/middleware/karma.js @@ -27,7 +27,7 @@ var urlparse = function (urlStr) { var common = require('./common') var VERSION = require('../constants').VERSION -var SCRIPT_TAG = '' +var SCRIPT_TAG = '' var LINK_TAG_CSS = '' var LINK_TAG_HTML = '' var SCRIPT_TYPE = {