Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<style>
/* Mark #container with HAS_SLOW_SELECTOR_LATER_SIBLINGS */
.nonexistent + .item {
color: purple;
}
/* See bug 1874066 comment 10 */
:has(> .item:last-child)::after, :has(> .item:first-child)::before {
color: pink;
}
</style>
<script src="util.js"></script>
<script>
window.onload = function() {
const N = 500;
for (let i = 0; i < N; i++) {
const d = document.createElement("div");
d.classList.add("item");
dut.appendChild(d);
}
flush_layout();
perf_start();
for (let i = 0; i < N; i++) {
dut.firstElementChild.remove();
}
flush_layout();
perf_finish();
};
</script>
<div id="dut" class="container"></div>