From 8f541d5752c47b2bded0fd23f0816e0ca84554c3 Mon Sep 17 00:00:00 2001 From: pardoman 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 = {