[Bug 18352] New: Note about Object.prototype.toString is unclear

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18352

           Summary: Note about Object.prototype.toString is unclear
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
        AssignedTo: cam@mcc.id.au
        ReportedBy: Ms2ger@gmail.com
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org


> There is one built-in ECMAScript function that behaves differently
> for platform objects with this custom Object.prototype.toString
> behavior compared to the built-in Object.prototype.toString:
> Function.prototype.bind will return a new Function object with a
> length property with a non-zero value if the object has a legacy
> caller that takes at least one argument. 

I found this rather confusing; I guess the point is that Function#bind looks at
[[Class]], and objects with a [[Call]] internal property get [[Class]] equal to
"Function" per <http://ecma-international.org/ecma-262/5.1/#sec-15>. It would
be nice to spell that out.

-- 
Configure bugmail: https://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 Sunday, 22 July 2012 19:29:49 UTC