W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2014

Re: Typeconverting Exotics

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 12 Jan 2014 17:08:19 -0500
Message-ID: <52D31253.7010909@mit.edu>
To: public-script-coord@w3.org
On 1/12/14 3:39 PM, Garrett Smith wrote:
> Exotics are host objects that can implement non-standard behavior.

Note that the behavior for document.all is in fact specced.  It's an 
insane behavior, but less insane than any other web-compatible option. 
The spec is at 
and the weird bits are:

1) ToBoolean(document.all) returns false.
2) document.all == undefined and document.all == null test true.
    document.all != undefined and document.all != null test false.
3) typeof document.all == "undefined".

All the other behaviors are as normal for WebIDL objects, which defines 
things like ToPrimitive() and whatnot.

This is the only object that needs this behavior and the only one that 
ever will, ideally, so while it might be nice to have a way of 
describing its behavior in ES6 terms it's even more important to not 
make it look like creating such objects is in any way OK or supported...

Received on Sunday, 12 January 2014 22:08:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC