BTF Measurements

Russell Leggett russell.leggett at
Tue Mar 13 10:00:44 PDT 2012

> Can you answer the 'cost' side of the BTF issue? That is if BTF was
> really easy, how many times would we have to opt-out so we can use the
> default value of "this"? My guess: you will need a lot zeros in place
> of X  in 0.0X% ;-)
> Sometimes the 'this' is not needed at all; does it ever matter that it
> is set to the lexical this?
There is a really big use case here that I worry about with BTF: jQuery
event handlers

For whatever reason, the jQuery guys decided that it would be awesome if
inside the handler, 'this' was bound
to the dom element that the event handler was attached to.

$('#foo').bind('click', function() {

I think you'll find that pattern all over the place for those using jQuery.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list