{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/988","labels_url":"https://api.github.com/repos/webpack/webpack/issues/988/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/988/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/988/events","html_url":"https://github.com/webpack/webpack/pull/988","id":69146360,"number":988,"title":"Possibility to load chunks with crossorigin","user":{"login":"danez","id":231804,"avatar_url":"https://avatars.githubusercontent.com/u/231804?v=3","gravatar_id":"","url":"https://api.github.com/users/danez","html_url":"https://github.com/danez","followers_url":"https://api.github.com/users/danez/followers","following_url":"https://api.github.com/users/danez/following{/other_user}","gists_url":"https://api.github.com/users/danez/gists{/gist_id}","starred_url":"https://api.github.com/users/danez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danez/subscriptions","organizations_url":"https://api.github.com/users/danez/orgs","repos_url":"https://api.github.com/users/danez/repos","events_url":"https://api.github.com/users/danez/events{/privacy}","received_events_url":"https://api.github.com/users/danez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-17T14:12:28Z","updated_at":"2015-04-21T07:39:06Z","closed_at":"2015-04-20T17:55:17Z","pull_request":{"url":"https://api.github.com/repos/webpack/webpack/pulls/988","html_url":"https://github.com/webpack/webpack/pull/988","diff_url":"https://github.com/webpack/webpack/pull/988.diff","patch_url":"https://github.com/webpack/webpack/pull/988.patch"},"body":"We are facing the problem, that our tracking of javascript errors currently is not working, due to CORS restrictions. This is because we load our chunks from a cdn domain and not the pages current domain.\r\n\r\nThis can easily be fixed by adding the crossorigin attribute to the script tags, but we can't do that for the tags which are injected by webpack.\r\n\r\nhttps://developer.mozilla.org/de/docs/Web/HTML/Element/script#attr-crossorigin\r\n\r\nIn this PR we added a new configuration option which can be set to one of the two valid options for the crossorigin attribute ('anonymous' or 'use-credentials')(by default false). If present the crossorigin attribute will be added to the injected script tag.\r\n\r\nThere are still some questions for this PR, which we are not sure about.\r\n\r\n* the location of config option may be not placed correctly in the output options? Any better ideas where to put that option? Currently we have *output.crossOriginLoading*\r\n* Should we validate the value of the configuration and throw if an invalid value is used? Where to do that?\r\n* Can we test this feature? If so, can you point us to a place were this test would be best placed?\r\n\r\nSorry for all this questions, but we are not that fit with webpacks internals :)"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/94673016","html_url":"https://github.com/webpack/webpack/pull/988#issuecomment-94673016","issue_url":"https://api.github.com/repos/webpack/webpack/issues/988","id":94673016,"user":{"login":"sokra","id":1365881,"avatar_url":"https://avatars.githubusercontent.com/u/1365881?v=3","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T07:39:06Z","updated_at":"2015-04-21T07:39:06Z","body":"Thanks"}}