Skip to content

Commit

Permalink
fix(playground): dispatch readystatechange + bubble DOMContentLoaded …
Browse files Browse the repository at this point in the history
…on document (mdn#10946)

fix(playground): dispatch readystatechange event
fix(playground): dispatch DOMContentLoaded event on document + bubble
  • Loading branch information
caugner authored and mostafaroshdy1 committed Apr 19, 2024
1 parent f12969f commit 5bbec3a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/public/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@
script.textContent = state.js;
document.body.appendChild(script);

dispatchEvent(new Event("DOMContentLoaded"));
dispatchEvent(new Event("load"));
document.dispatchEvent(
new Event("DOMContentLoaded", { bubbles: true })
);
document.dispatchEvent(new Event("readystatechange"));
window.dispatchEvent(new Event("load"));

initialized = true;
}
window.addEventListener("message", (event) => {
Expand Down

0 comments on commit 5bbec3a

Please sign in to comment.