Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/path/interfaces/getPathSegmentAtLength-detached-element.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>SVGPathElement.getPathSegmentAtLength() works on a detached path element</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/getPathData-helpers.js"></script>
<script>
test(() => {
path.setAttribute("d", "M 0 0 L 100 0 L 100 100");
assert_path_segment_equals(
path.getPathSegmentAtLength(50), { type: "L", values: [100, 0] });
}, "getPathSegmentAtLength() works on a detached path element");
</script>