set crossOrigin attribute on cdn scripts (+6425)

pull/39/head^2
nightwing 2015-03-13 15:23:19 +04:00
rodzic e45d34e881
commit 898c34de0e
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -211,6 +211,10 @@ var loadScript = function(path, id, callback) {
s.src = path;
s.charset = 'utf-8';
s.async = true;
if (path.lastIndexOf(require.MODULE_LOAD_URL, 0) == 0)
s.crossOrigin = true;
head.appendChild(s);
s.onload = s.onreadystatechange = function(_, isAbort) {

Wyświetl plik

@ -93,6 +93,7 @@ function loadScript(path, token, callback) {
var and = path.indexOf("?") >= 0 ? "&" : "?";
s.src = path + (token ? and + "access_token=" + encodeURIComponent(token) : "");
s.crossOrigin = true;
head.appendChild(s);
s.onload = s.onreadystatechange = function(_, isAbort) {