This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18352 - Note about Object.prototype.toString is unclear
Summary: Note about Object.prototype.toString is unclear
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard: [v1]
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-22 19:29 UTC by Ms2ger
Modified: 2013-08-03 06:48 UTC (History)
2 users (show)

See Also:


Attachments

Description Ms2ger 2012-07-22 19:29:47 UTC
> 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.
Comment 1 Cameron McCormack 2013-08-03 06:48:55 UTC
I added a clarifying sentence:

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.103;r2=1.104;f=h

I didn't updated Overview.html since that Object.prototype.toString stuff should disappear in favour of @@toStringTag in due course.