Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21  
    Thanks for clarifying that. And I am familiar with caching event handlers. I generally cache element references too as lookups generate a bit of overhead.

    Also, as you brought up bound methods, I thought I'd post a quick link for anyone reading that may confused about what's going on with the whole bind(this)/bindAsEventListener(this):
    Prototype: bind() vs bindAsEventListener() - JavaScript / Ajax / DHTML answers
    Understanding how those two methods work can allow for a bit more flexibility in your code.
    danNielson.com - Slalom - twitter - facebook
    A posted thanks dies with the thread. Clicking the button lasts until the admins get bored with this site and throw it in the recycling bin.
  2. #22  
    Yeah, I figured you were up on pre-caching. I just put that bit in there for newbie devs that might be reading that so they weren't confused by the lack of .bind(). It's a really important point that a lot of folks seem to miss.
  3. #23  
    Agreed. I've got a bit of messed up code in some of my projects thanks to not properly understanding method binding back when it was written. Some of this stuff, I think needs to go on a quick cheat-sheet for new developers.
    danNielson.com - Slalom - twitter - facebook
    A posted thanks dies with the thread. Clicking the button lasts until the admins get bored with this site and throw it in the recycling bin.
Page 2 of 2 FirstFirst 12

Posting Permissions