Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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(() => {
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
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>