Simple as that: (function(arg1) {}.bind(window)).length results in 0 instead of 1.
<rdar://problem/19429047>
What is the version of Safari/WebKit you are using? What is the platform/OS version? On Mac, you can find the Safari/WebKit and OS version information in Safari > About Safari and Apple (menu) > About this Mac, respectively. I'm neither able to reproduce this bug using shipping Safari Version 8.0.2 (10600.2.5) on 10.10.1 (14B25) nor with the latest WebKit nightly r178255 on the same OS. I also was unable to reproduce this bug using Mac nightly r178109 (2015-01-08 15:33:34 GMT). That is, the expression "(function(arg1) {}.bind(window)).length" evaluates to 1 in Web Inspector.
I'm using PhantomJS 1.9.7 on Windows and Unix.
(In reply to sarimarton from comment #0) > (function(arg1) {}.bind(window)).length results in 0 instead of 1. (In reply to sarimarton from comment #3) > I'm using PhantomJS 1.9.7 on Windows and Unix. At that time, PhantomJS was shipped with a rather outdated version of WebKit. As of v2.1.1 (macOS), Function.prototype.bind returns correct "length" of 1. Also works as expected in Safari 13.1 and r265666.