Fix Script loading
PiperOrigin-RevId: 488440736
This commit is contained in:
parent
9a2af2f2a1
commit
ca7b5e9d8b
|
@ -971,7 +971,7 @@ async function runScript(scriptUrl: string) {
|
||||||
importScripts(scriptUrl.toString());
|
importScripts(scriptUrl.toString());
|
||||||
} else {
|
} else {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.setAttribute('url', scriptUrl);
|
script.setAttribute('src', scriptUrl);
|
||||||
script.setAttribute('crossorigin', 'anonymous');
|
script.setAttribute('crossorigin', 'anonymous');
|
||||||
return new Promise<void>((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
script.addEventListener('load', () => {
|
script.addEventListener('load', () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user