Skip to content

Commit

Permalink
Add crossorigin attribute to script tags
Browse files Browse the repository at this point in the history
Helps when tests are loading files from another localhost server.

Addresses an issue where errors from scripts loaded from another server would read as "Script Error" without any additional information on to where the error was produced.

This articles contains details on the "Script Error" case: https://blog.getsentry.com/2016/05/17/what-is-script-error.html
  • Loading branch information
pardoman authored Jun 29, 2016
1 parent b93b9cc commit 79a6d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middleware/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var urlparse = function (urlStr) {
var common = require('./common')

var VERSION = require('../constants').VERSION
var SCRIPT_TAG = '<script type="%s" src="%s"></script>'
var SCRIPT_TAG = '<script type="%s" src="%s" crossorigin="anonymous"></script>'
var LINK_TAG_CSS = '<link type="text/css" href="%s" rel="stylesheet">'
var LINK_TAG_HTML = '<link href="%s" rel="import">'
var SCRIPT_TYPE = {
Expand Down

0 comments on commit 79a6d69

Please sign in to comment.