Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/nodes/ParentNode-querySelectors-namespaces.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>querySelectorAll must work with namespace attribute selectors on SVG</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg id="thesvg" xlink:href="foo"></svg>
<script>
"use strict";
setup({ single_test: true });
const el = document.getElementById("thesvg");
assert_equals(document.querySelector("[*|href]"), el);
assert_array_equals(document.querySelectorAll("[*|href]"), [el]);
done();
</script>