[ snip ]

>> Many functions, both in the DOM and in the library, accept functions as
>> arguments. ES5 provides a bind() method that can ease the use of these
>> functions when the passed method comes from an object. This is, however,
>> inconvenient. E.g.:
>>
>>  node.addEventListener("click", obj.method.bind(obj, ...));
>>
>> Also, insufficient. Event listeners can't be detached when using
>> Function.prototype.bind:
>>
>
> That is not true at all. I suggest reading the ES5 specifation that
> before proceeding.

>From 15.3.4.5:

   4. Let F be a new native ECMAScript object .

I can't discern any particular reason why equivalence should succeed
for multiple calls to bind() from the spec. What am I missing?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to