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

Re: Typeconverting Exotics

From: Mark S. Miller <erights@google.com>
Date: Sun, 12 Jan 2014 14:22:11 -0800
Message-ID: <CABHxS9guq0d8wet3h1y-0Hx_i4jO-rkiAvbwrPTmK-S8oXQ2BQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Historical note: We had a window during ES5 days where we could have
limited the document.all insanity to sloppy mode, by codifying the FF
behavior on edge cases rather than the WebKit behavior on edge cases.
Instead TC39 dropped this ball and DOM picked it up, codifying the dead-end
WebKit behavior which we are now forever stuck with. The salient difference
was that the FF behavior could be construed as a per-code issue rather than
a per-value issue.



On Sun, Jan 12, 2014 at 2:08 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> 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 http://www.whatwg.org/specs/web-apps/current-work/
> multipage/obsolete.html#dom-document-all 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...
>
> -Boris
>
>


-- 
    Cheers,
    --MarkM
Received on Sunday, 12 January 2014 22:22:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:51 UTC