This commit is contained in:
Alex Dima 2020-09-18 22:50:26 +02:00
parent 7443e5ef84
commit 07621e127b
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0

View file

@ -216,7 +216,8 @@ function createLoaderRules(languages: IFeatureDefinition[], features: IFeatureDe
var currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);
if (result.substring(0, currentOrigin.length) !== currentOrigin) {
var js = '/*' + label + '*/importScripts("' + result + '");';
return 'data:text/javascript;charset=utf-8,' + encodeURIComponent(js);
var blob = new Blob([js], { type: 'application/javascript' });
return URL.createObjectURL(blob);
}
}
return result;