Working (do not look at code)

This commit is contained in:
Wolfgang Ginolas 2025-09-25 18:10:00 +02:00
parent c55502b792
commit d608d783b1
2 changed files with 14 additions and 0 deletions

View File

@ -7312,6 +7312,7 @@ console.log("XXX: loaded");
}),
window.webxdc.setUpdateListener(ut, 0));
};
window.chessOnload = onload;
},
};
});

View File

@ -29,10 +29,23 @@ define([
return tag;
}
function waitFor(contition, callback) {
if (contition()) {
callback();
} else {
setTimeout(() => waitFor(contition, callback), 10);
}
}
function loadChess() {
const legacyTag = loadScript('vite-legacy-polyfill', '/webxdc/assets/polyfills-legacy-Op9eHCRg.js');
legacyTag.addEventListener('load', () => {
System.import('/webxdc/assets/index-legacy-CpC3q1r5.js');
waitFor(() => window.chessOnload, () => window.chessOnload());
// const legacyTag = loadScript('vite-legacy-entry', '/webxdc/assets/index-legacy-CpC3q1r5.js');
// legacyTag.addEventListener('load', () => {
// window.chessOnload();
// });
});
}