mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
This commit is contained in:
parent
7443e5ef84
commit
07621e127b
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue