mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
8e56367092
We have to unregister link element stylesheets from the old document's StyleSheetList when moving them into a new document. This makes it possible to load GitHub contributor graphs. :^)
11 lines
441 B
HTML
11 lines
441 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
let doc = new DOMParser().parseFromString(`<link rel="stylesheet" href="data:text/css,div{}">`, `text/html`);
|
|
let link = doc.head.firstChild;
|
|
document.head.appendChild(link);
|
|
test(() => {
|
|
println("Sheets in old doc: " + doc.styleSheets.length)
|
|
println("Sheets in new doc: " + document.styleSheets.length)
|
|
println("PASS (didn't crash)");
|
|
})
|
|
</script>
|