Re: Exotic OBJECT?

2014-08-13 Thread Garrett Smith
On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 7:52 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] As

Re: Exotic OBJECT?

2014-08-13 Thread Allen Wirfs-Brock
On Aug 13, 2014, at 8:46 AM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 7:52 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14,

Re: Exotic OBJECT?

2014-08-13 Thread Boris Zbarsky
On 8/12/14, 12:44 PM, Garrett Smith wrote: If the typeof OBJECT results function then it either: a) implements [[Call]] That's exactly what it does. This allows making plug-in objects callable if the plug-in decides to do so. Since calling `Function.prototype.toString` with OBJECT as the

Exotic OBJECT?

2014-08-12 Thread Garrett Smith
What's the explanation and reason for this strange characteristic of the OBJECT element in Firefox? Firefox 31: typeof document.createElement(object) function Function.prototype.toString.call(document.createElement(object)); TypeError: Function.prototype.toString called on incompatible object If

Re: Exotic OBJECT?

2014-08-12 Thread Claude Pache
Le 12 août 2014 à 18:44, Garrett Smith dhtmlkitc...@gmail.com a écrit : What's the explanation and reason for this strange characteristic of the OBJECT element in Firefox? Firefox 31: typeof document.createElement(object) function

Re: Exotic OBJECT?

2014-08-12 Thread Garrett Smith
On 8/12/14, Claude Pache claude.pa...@gmail.com wrote: Le 12 août 2014 à 18:44, Garrett Smith dhtmlkitc...@gmail.com a écrit : What's the explanation and reason for this strange characteristic of the OBJECT element in Firefox? Firefox 31: typeof document.createElement(object) function

Re: Exotic OBJECT?

2014-08-12 Thread Allen Wirfs-Brock
On Aug 12, 2014, at 9:44 AM, Garrett Smith wrote: What's the explanation and reason for this strange characteristic of the OBJECT element in Firefox? Firefox 31: typeof document.createElement(object) function Function.prototype.toString.call(document.createElement(object)); TypeError:

Re: Exotic OBJECT?

2014-08-12 Thread Garrett Smith
On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Allen - On Aug 12, 2014, at 9:44 AM, Garrett Smith wrote: What's the explanation and reason for this strange characteristic of the OBJECT element in Firefox? Firefox 31: typeof document.createElement(object) function

Re: Exotic OBJECT?

2014-08-12 Thread Allen Wirfs-Brock
On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Since calling `Function.prototype.toString` with OBJECT as the this value results in a TypeError, it appears that the OBJECT does not implement [[Call]] and thus the only

Re: Exotic OBJECT?

2014-08-12 Thread Garrett Smith
On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] | Function.prototype.toString | ... | | The toString function is not generic; it throws a | TypeError exception

Re: Exotic OBJECT?

2014-08-12 Thread Allen Wirfs-Brock
On Aug 12, 2014, at 7:52 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Aug 12, 2014, at 2:17 PM, Garrett Smith wrote: On 8/12/14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] | Function.prototype.toString | ... | | The toString