Re: [WebIDL] ES3.1 'flexible' attribute and 'delete' semantics

Hi Garrett.

Travis Leithead:
> > My question, once again, is whether WebIDL will define exactly how
> > to translate the behavior of operators like delete into the
> > JavaScript language binding for DOM objects.

Garrett Smith:
> That isn't a question. This is: Why does WebIDL need to define how
> delete works on Document.prototype.getElementById? There is no
> guarantee that Document will be an object, or that Document.prototype
> will be the [[Prototype]] of document. Nor should there be.

Web IDL wouldn’t specifically say “delete works on
Document.prototype.getElementById”, but I think it should say how these
kinds of objects (Document, Document’s [[Prototype]]) behave, e.g.
“a property on an interface prototype object that corresponds to an IDL
operation has attributes { DontEnum }”.  JS libraries do exploit the
prototype chain to add methods etc., so it would be good if they could
do this with the blessing of a spec, rather than de factor behaviour.
Given MS’s interest in following Web IDL, there’s a chance we could get
all four browsers doing the same thing, too.

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

Received on Friday, 15 August 2008 00:00:02 UTC