[Bug 14877] Define [[Class]] of interface prototype objects, exception interface objects, and exception interface prototype objects

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14877

Aryeh Gregor <ayg@aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |see comment #16

--- Comment #17 from Aryeh Gregor <ayg@aryeh.name> 2011-11-25 20:01:19 UTC ---
(In reply to comment #15)
> No, the Function prototype object is itself a Function object. (sic)

Ah, I see.  We were using different definitions.  By "is a Function object" I
meant "is instanceof Function"/"has Function.prototype in its prototype chain",
while you meant "has [[Class]] 'Function'".  You're quite correct, I
misunderstood.  Your point is that

  {}.toString.call(Object.prototype) === "[object Object]"
  {}.toString.call(Function.prototype) === "[object Function]"
  {}.toString.call(Boolean.prototype) === "[object Boolean]"

so for consistency we also want

  {}.toString.call(NodeList.prototype) === "[object NodeList]"

and so on -- not NodeListPrototype or Object or whatever.

That's a really good point, and now that you point it out, I agree.  For
consistency with ES, we should define the [[Class]] of an interface prototype
object to be the identifier of the interface, and the [[Class]] of an exception
interface prototype object to be the identifier of the exception.  The
[[Class]] of interface objects and exception interface objects should remain
"Function", as now.  (I was confused in comment 9 when I talked about the
[[Class]] of exception interface objects not being defined -- it clearly is.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Friday, 25 November 2011 20:01:56 UTC