Omitting prototype objects for some interfaces (was: Re: Thoughts on ES5 binding modifications)

Just responding to one aspect of this (and culling the CC list)…

Travis Leithead:
> > Travis Leithead:
> > > > > * The ability to specify an “interface object only” interface
> > > > >   (e.g., NodeFilter, needed for the W3C DOM L2 Traversal spec)
> […]

Cameron McCormack:
> > OK, but I am not sure what specifying “interface object only” actually 
> > means, then. What would it change in the ES binding?  (The lack of a 
> > prototype object?)
> 
> Yes, exactly. In IE9 specifically, any "msInterfaceObjectOnly"
> annotated interface will not have a prototype property (or
> corresponding interface prototype object), nor will support any
> operations or attributes found on the interface (it ignores them).
> There are only three occurances of this annotation in IE9:
> * NodeFilter (ignores "acceptNode()" operation)
> * SVGUnitTypes
> * SVGZoomAndPan (ignores "zoomAndPan" property)
> 
> SVGRenderingIntent was also annotated this way, but is not supported in IE9

OK, I understand now.  You want NodeFilter to exist, as well as the
constants on it, but not NodeFilter.prototype, but Web IDL currently
requires them all to exist.

Would adding wording saying that the prototype property and interface
prototype object need only exist if there can be a host object that
implements them be good enough to address this?  Or is it something you
think specification writers should be noting (with an
[InterfaceObjectOnly] or [NoPrototypeObject])?

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Wednesday, 10 November 2010 23:06:18 UTC