mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb: Set readyState to complete for DOMParser documents
Documents created via DOMParser.parseFromString() are parsed synchronously and do not participate in the browsing context's loading pipeline. This patch ensures that if the document has no browsing context (i.e. was parsed via DOMParser), its readiness is set to "complete" synchronously. Fixes WPT: domparsing/xmldomparser.html
This commit is contained in:
parent
b00e57139f
commit
ff78746be1
Notes:
github-actions[bot]
2025-06-25 08:50:18 +00:00
Author: https://github.com/mikiubo
Commit: ff78746be1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4992
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/shannonbooth ✅
6 changed files with 36 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
println(`readyState of 'new Document()' should be 'complete': '${new Document().readyState}'`);
|
||||
println(`readyState of 'document.implementation.createHTMLDocument()' should be 'complete': '${document.implementation.createHTMLDocument().readyState}'`);
|
||||
println(`readyState of 'document.implementation.createDocument()' should be 'complete': '${document.implementation.createDocument('http://www.w3.org/1999/xhtml', '').readyState}'`);
|
||||
println(`FIXME: readyState of 'new DOMParser().parseFromString('', 'text/html')' should be 'complete': '${new DOMParser().parseFromString('', 'text/html').readyState}'`);
|
||||
println(`readyState of 'new DOMParser().parseFromString('', 'text/html')' should be 'complete': '${new DOMParser().parseFromString('', 'text/html').readyState}'`);
|
||||
|
||||
const iframe = document.createElement("iframe");
|
||||
document.body.appendChild(iframe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue