mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
Fixes bug when we always return null from getElementById() on unconnected roots because id to element cache is only maintained for connected roots. Fixes broken Perf-Dashboard suite in Speedometer 3.
13 lines
No EOL
414 B
HTML
13 lines
No EOL
414 B
HTML
<!DOCTYPE html>
|
|
<body></body>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let host = document.createElement("div");
|
|
let shadow = host.attachShadow({ mode: "open" });
|
|
shadow.innerHTML = `<p id="foo">Hello</p><span id="bar">World</span>`;
|
|
let foo = shadow.getElementById("foo");
|
|
let bar = shadow.getElementById("bar");
|
|
println(foo.textContent + bar.textContent);
|
|
});
|
|
</script> |