- From: Dirk Schulze via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Jun 2019 18:41:18 +0000
- To: public-svg-issues@w3.org
dirkschulze has just labeled an issue for https://github.com/w3c/svgwg as "Agenda+": == Values in SVGZoomAndPan and SVGUnitTypes should be accessible to javascript == Please: The [SVG 2 specification](https://www.w3.org/TR/2016/CR-SVG2-20160915/types.html#InterfaceSVGZoomAndPan) Makes it impossible to write var x = ZoomAndPan.SVG_ZOOMANDPAN_UNKNOWN as ZoomAndPan is [NoInterfaceObject]. Similarly with SVGUnitTypes. This is not what either Chrome or Firefox do (both support accessing the ZoomAndPan interface values directly). In fact Firefox has tests that contain SVGUnitTypes so it's certainly likely that there's also usage of this in the wild. I propose changing the ZoomAndPan interface to ``` interface SVGZoomAndPan { }; SVGZoomAndPan implements SVGZoomAndPanValues; ``` Then having this as SVGZoomAndPanValues ``` [NoInterfaceObject] interface SVGZoomAndPanValues { // Zoom and Pan Types const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0; const unsigned short SVG_ZOOMANDPAN_DISABLE = 1; const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2; [SetterThrows] attribute unsigned short zoomAndPan; }; ``` And all existing users of ZoomAndPan i.e. SVGSVGElement and SVGViewElement would then implement SVGZoomAndPanValues This would mean that an SVGSVGElement would not be an SVGZoomAndPan but you would be able to access its contents. Similarly for SVGUnitTypes. See https://bugzilla.mozilla.org/show_bug.cgi?id=1241899 and https://bugzilla.mozilla.org/show_bug.cgi?id=1241898 for the Firefox implementation which is landing now. This will align Firefox with Chrome's implementation. See https://github.com/w3c/svgwg/issues/291
Received on Wednesday, 19 June 2019 18:41:21 UTC