W3C home > Mailing lists > Public > www-svg@w3.org > August 2016

Should interfaces with values really be [NoInterfaceObject]?

From: Robert Longson <longsonr@gmail.com>
Date: Sun, 21 Aug 2016 22:07:10 +0100
Message-ID: <CAOu7Uv5mtWS2cFVrOGOA4XswoWAigFs8+XsGmX+LPdkWtCF8=Q@mail.gmail.com>
To: www-svg@w3.org
SVG 2 has this webidl definition of SVGZoomAndPan

interface *SVGZoomAndPan* {

  // 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;

  attribute unsigned short zoomAndPan

Without the NoInterfaceObject one could write something like

   if (element.zoomAndPan == SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE)

While one now has to write it as

   if (element.zoomAndPan == SVGSVGElement.SVG_ZOOMANDPAN_DISABLE)

The same applies to SVGUnitTypes. Do we mind about keeping backwards
compatibility with any existing usages like this. We found when making
this change that our own unit tests fail on SVGUnitTypes usage for

Received on Sunday, 21 August 2016 21:07:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:05 UTC