Fix Script loading

PiperOrigin-RevId: 488440736
This commit is contained in:
Sebastian Schmidt 2022-11-14 12:38:23 -08:00 committed by Copybara-Service
parent 9a2af2f2a1
commit ca7b5e9d8b

View File

@ -971,7 +971,7 @@ async function runScript(scriptUrl: string) {
importScripts(scriptUrl.toString());
} else {
const script = document.createElement('script');
script.setAttribute('url', scriptUrl);
script.setAttribute('src', scriptUrl);
script.setAttribute('crossorigin', 'anonymous');
return new Promise<void>((resolve) => {
script.addEventListener('load', () => {