-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hi ! I'm a simple web developer, maintainer of the wbo.ophir.dev open source whiteboard, which was recently struck by lovasoa/whitebophir#321
I'm seeking clarification on the design decision to mark SVGPathSegment
with [NoInterfaceObject]
in the SVG specification: https://svgwg.org/specs/paths/#InterfaceSVGPathSegment
This attribute prevents direct instantiation of SVGPathSegment
objects in JavaScript, which complicates the use of methods like setPathData()
that expect a sequence of SVGPathSegment
objects.
Given that SVGPathSegment
isn't directly constructible, how are developers intended to create and pass path segment objects to setPathData()
? Is the expectation to use plain JavaScript objects that match the structure of SVGPathSegment
? Then shouldn't we have:
dictionary SVGPathSegmentInit {
required DOMString type;
required sequence<float> values;
};
interface mixin SVGPathData {
sequence<SVGPathSegment> getPathData(optional SVGPathDataSettings settings = {});
undefined setPathData(sequence<SVGPathSegmentInit> pathData);
};
Thank you for your insights !