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-005.svg
<title>getIntersectionList() on element with intersecting bounding box</title>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<rect id="e0" x="110" y="100" width="100" height="100" fill="red"/>
<rect id="e1" x="160" y="130" width="40" height="40" fill="green"/>
<path id="e2" stroke="blue" fill="none" stroke-width="2" d="M100 200 120 110 220 100"/>
<script>
test(t => {
const svg = document.documentElement;
const queryRect = document.getElementById('e1').getBBox();
const list = svg.getIntersectionList(queryRect, null);
const result = Array.from(list).map(e => e.id).sort();
assert_array_equals(result, ['e0', 'e1']);
});
</script>
</svg>