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

On Tue, Aug 12, 2008 at 8:31 AM, Travis Leithead
<travil@windows.microsoft.com> wrote:
>
> Cameron,
>
> I recently became aware of Microsoft's involvement in the ECMAScript 3.1 effort as of

Surprises everywhere.

about a month ago. (Including Allen & Pratap from MS Jscript, who are
driving that effort.) ES3.1 makes a few subtle changes that I thought
you'd like to follow up on, since they impact the WebIDL spec, namely
"DontDelete" is changing to "Flexible", among other things which
should be noted in WebIDL.

WebIDL really needs help.

>
> I've also done some recent investigation on how browsers handle ECMAScript's operators (delete, new, instanceof, etc.) and found that they are somewhat diverging in implementation; in particular the 'delete' operator. I've noted that some implementations use the delete operator in the DOM in the same spirit that it is speced in ECMAScript--that is the delete operator removes a given property completely. I've noted that other implementations only allow the delete operator to remove a "shadowed" property on the DOM, but never actual delete the underlying "built-in" property.

There is so much wrong with that statement I don't know where to
start. You have demonstrated what appears to be a gross
misunderstanding of the specs combined with some fictitious
terminology to describe a phenomenon that I think you are imagining.

DOM objects are Host objects. They don't have "built in" properties.
What does underlying mean? Does underlying mean something up the
prototype chain (implementations that have that)? Properties that
exist in the prototype chain are called "properties that exist in the
prototype chain." If a property exists in more than one place in the
prototype chain, the furthest ancestor property are often said to be
'shadowed'.

[[Delete]] does not work up the prototype chain. Your claim:-

| other implementations only allow the delete operator
| to remove a "shadowed" property on the DOM

is something that I have not ever observed and something that I would
find highly unlikely. It would require a special form of [[Delete]]
for a Host object, and one that would seem to require extra effort to
make the delete operator work in a very unintuitive way.

I would like to see your observations. Please post your test code.

> I wondered if WebIDL makes any mention of the behavior of ECMAScript operators on host objects and how they should behave?

You could read it if you wanted to, and, having read it myself, I
could answer your question. However, I would not recommend anyone who
is not an expert to read that, and so I would not encourage you to.
The reason I would not recommend anyone who is not an expert in the
relevant standards to read Web IDL is that it has too much
misinformation and bad ideas that came from someone who is almost as
green as you. Such an official academic looking paper would likely
have an influence on someone who is not an expert.

This type of documentation is harmful for the web. It is potentially
even more harmful for people like you who are not only green, but also
in a position to make decisions about standards and apparently, IE. I
would rather recommend reading

the DOM TRs:
http://www.w3.org/DOM/DOMTR

the Ecma-262 spec
http://www.ecma-international.org/publications/standards/Ecma-262.htm

(unofficially available for casual reading in HTML)
http://bclary.com/2004/11/07/

I think it would be a good idea to have three solid web applications
under your belt before continuing.

If you're interested in making IE to be less of an abominable peice of
junk, it would well behoove you to learn about browsers, the web, and
especially the relevant standards.

Garrett
>
>
> - Travis Leithead - OM Program Manager - Internet Explorer

Received on Wednesday, 13 August 2008 06:21:03 UTC