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

Typeconverting Exotics

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Sun, 12 Jan 2014 12:39:33 -0800
Message-ID: <CABZUbM0pUkLmGcoJuFjP4_XW1KM-kU8ALL0jUN-=p8YX8qJB-Q@mail.gmail.com>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Exotics are host objects that can implement non-standard behavior.

For example, in Firefox:

typeof document.all == "undefined"; // true
undefined == document.all;   // true
undefined === document.all; // false
"all" in document; // true
Object.getPrototypeOf(document).hasOwnProperty("all"); // true

Consistent results are generally desirable. I'm just thinking of
[[ToBoolean]], [[ToPrimitive]], and [[HasProperty]]. Should it be
spec'd? Should exotics masqueraded as undefined, be typed
Exotic(null|undefined)?
-- 
Garrett
@xkit
ChordCycles.com
garretts.github.io
Received on Sunday, 12 January 2014 20:40:00 UTC

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