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
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
Whiteboard: [v1]
Depends on:
Reported: 2012-07-22 19:29 UTC by Ms2ger
Modified: 2013-08-03 06:48 UTC (History)
2 users (show)

See Also:


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 <>. It would be nice to spell that out.
Comment 1 Cameron McCormack 2013-08-03 06:48:55 UTC
I added a clarifying sentence:;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.