blob: c1f1c9dbcd1fee66caa1b97039c94820ce70db40 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Test import from setInterval.');
// Module will be executed asynchronously.
window.jsTestIsAsync = true;
window.passedCocoa = null;
window.id = null;
function loaded(cocoa)
{
window.passedCocoa = cocoa;
shouldBeTrue(`window.imported`);
shouldBe(`window.passedCocoa`, `window.exportedCocoa`);
finishJSTest();
}
</script>
<script>
</script>
<script src="../../../resources/js-test-post.js"></script>
<script type="module">
window.id = setInterval(`clearInterval(window.id);import("./resources/import-src-simple.js").then((ns) => loaded(ns.ok));`, 0);
</script>
</body>
</html>