Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 1 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
    • /html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.sharedworker.html - WPT Dashboard Interop Dashboard
    • /html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=dedicatedworker,sharedworker
// META: script=./resources/evaluation-order-setup.js
setupTest("importScripts() queueing a microtask then throwing an exception", [
// Step 6 of #run-a-classic-script.
"body",
// Step 7.1.1 ("Clean up after running script") is no-op because JavaScript
// execution context stack is still non-empty immediately after
// importScripts() as the outer script is still executing.
// Step 7.1.2 (Rethrowing an exception) causes worker onerror.
"global-error",
// Microtask checkpoint is performed later, perhaps
// "Clean up after running script" after the outer script is finished.
"microtask",
]);
importScripts('./resources/evaluation-order-1-throw.js');