No public description

PiperOrigin-RevId: 571109389
This commit is contained in:
Sebastian Schmidt 2023-10-05 13:12:57 -07:00 committed by Copybara-Service
parent 24da737272
commit a1e542fc16

View File

@ -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();