LibWeb: Support Document.onreadystatechange

This is just a standard IDL event attribute handler.

Fixes at least one WPT test:
https://wpt.live/html/dom/documents/resource-metadata-management/document-readyState.html
This commit is contained in:
Andreas Kling 2024-10-08 16:24:23 +02:00 committed by Andreas Kling
commit 26be8f865a
Notes: github-actions[bot] 2024-10-08 16:50:11 +00:00
5 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,10 @@
<script src="../include.js"></script>
<script>
let readyStates = []
document.onreadystatechange = function() {
readyStates.push(document.readyState);
}
test(() => {
println(readyStates);
});
</script>