Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/nodes/DocumentFragment-querySelectorAll-after-modification.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>querySelectorAll should still work on DocumentFragments after they are modified</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
setup({ single_test: true });
const frag = document.createDocumentFragment();
frag.appendChild(document.createElement("div"));
assert_array_equals(frag.querySelectorAll("img"), [], "before modification");
frag.appendChild(document.createElement("div"));
// If the bug is present, this will throw.
assert_array_equals(frag.querySelectorAll("img"), [], "after modification");
done();
</script>