Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/web-platform/tests/svg/struct/scripted/svg-getIntersectionList-001.svg
<html:script src="/resources/testharness.js"/>
<html:script src="/resources/testharnessreport.js"/>
<html:link rel="stylesheet" href="/fonts/ahem.css"/>
<style>
text {
font-family: Ahem;
font-size: 100px;
}
</style>
<text x="0" y="80">Text0</text>
<text x="0" y="80" style="display:none">Text1</text>
<text x="0" y="80" pointer-events="none">Text2</text>
<text x="0" y="80">Text3</text>
<script>
test(t => {
const svg = document.documentElement;
const rect = svg.createSVGRect();
rect.x = 10;
rect.y = 70;
rect.width = 20;
rect.height = 20;
const texts = document.querySelectorAll('text');
const list = svg.getIntersectionList(rect, null);
assert_array_equals(list, [texts[0], texts[3]]);
}, 'SVGSVGElement.getIntersectionList()');
</script>
</svg>