w3c / svgwg

SVG Working Group specifications
Other
704 stars 132 forks source link

What should happen when trying to insert empty strings or separators into SVGStringList #930

Open longsonr opened 8 months ago

longsonr commented 8 months ago

Please: The specification https://www.w3.org/TR/SVG2/types.html#InterfaceSVGStringList says that insertItemBefore, replaceItem and appendItem do not throw unless the SVGStringList is read only.

https://www.w3.org/TR/SVG2/types.html#__svg__SVGNameList__insertItemBefore

So what should happen if we

Currently Firefox will not insert an empty string but Chrome will. All browsers seem to allow inserting strings with separators but if the document is serialised and reparsed you'll get an SVGStringList with more entries than you had originally.

If we just append strings with separators then when we serialise them we'll have additional items.