Function#bind [[HasInstance]] question.

John-David Dalton john.david.dalton at gmail.com
Tue Aug 16 07:26:45 PDT 2011


Sorry about the last empty reply, GMail got ahead of itself :D

So Chrome and Firefox disagree on their Function#bind implementation.
http://es5.github.com/#x15.3.4.5.2
http://es5.github.com/#x15.3.4.5.3

~~~ js
function Bar() {
  return 1;
}
var bound = Bar.bind({});
new bound instanceof bound; // Firefox reports `true`, Chrome `false`
(I think Chrome is right)
new bound instance of Bar; // Firefox and Chrome report `true`
~~~

The test262 doesn't appear to cover this case.
What is the correct result of `new bound instance of bound;` and why?

-JDD


More information about the es-discuss mailing list