Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /svg/struct/scripted/svg-getIntersectionList-002.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="UTF-8"?>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<script>
const test = async_test('getIntersectionList() on clipped element');
window.onload = test.step_func_done(() => {
const testSVG = document.getElementById('root');
const r = testSVG.createSVGRect();
r.x = 0;
r.y = 0;
r.width = 100;
r.height = 99.9;
assert_equals(testSVG.getIntersectionList(r, testSVG).length, 1);
});
</script>
<rect x="0" y="0" width="200" height="200"/>
<clipPath id="MyClip">
<rect y="100" width="200" height="100"/>
</clipPath>
<rect x="0" y="0" width="200" height="200" clip-path="url(#MyClip)" fill="green"/>
</svg>