A List Apart: Articles: Getting Out of Binding Situations in JavaScript:

JavaScript is very dynamic and relies on “prototypal inheritance,” which is a significantly different paradigm than class-based inheritance.
Perhaps you’re not familiar with languages that treat functions as first-order values, in which case the line var fx = john.greet; may seem weird. This does not call the greet method, but creates a reference to it—an alias of sorts, if you will.

You've probably seen all this before, but this article in particular does a pretty nuanced job of explaining scoping with Javascript, and is from 2008. None of this should be a surprise, though it sometimes is. ;^)

(I'm assigning event listeners in ExtJS as part of a GridPanel's original parameter object, but though it's working fine in one workflow, the listening function and/or the link to the event is being dropped completely in another. So it's time for a quick refresher to see if I can find out where the listener is going.)

Labels: ,