No public description
PiperOrigin-RevId: 571109389
This commit is contained in:
parent
24da737272
commit
a1e542fc16
|
@ -13,8 +13,8 @@ export 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('src', scriptUrl);
|
(script as {src:string}).src = scriptUrl.toString();
|
||||||
script.setAttribute('crossorigin', 'anonymous');
|
script.crossOrigin = 'anonymous';
|
||||||
return new Promise<void>((resolve, revoke) => {
|
return new Promise<void>((resolve, revoke) => {
|
||||||
script.addEventListener('load', () => {
|
script.addEventListener('load', () => {
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user