Function#bind [[HasInstance]] question.
john.david.dalton at gmail.com
Tue Aug 16 10:34:24 PDT 2011
Your explanation made it "click".
I was going to file a bug report, but found it already existed (from
On Tue, Aug 16, 2011 at 12:12 PM, Luke Hoban <lukeh at microsoft.com> wrote:
> My interpretation of these spec sections:
> (new bound) instanceof bound
> => (new Bar()) instanceof bound // bind's Construct defers to the targetFunction and ignores bound thisValue
> => bound.[[HasInstance]](new Bar()) // meaning of instanceof
> => Bar.[[HasInstance]](new Bar()) // bind's HasInstance defers to the targetFunction
> => true // normal HasInstance
> Similarly for 'new bound instanceof Bar'. IE and Firefox both appear to agree with this result.
More information about the es-discuss