Typeconverting Exotics

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