knockout/knockout — pull request #1051 by mwiencek (2013-07-27 05:13:55+00:00)
Title: Have "this" refer to the binding handler inside an init() or update() method

Since the binding handler is the "owner" of these methods in this context, I expected "this" to be the binding handler itself, but instead it's the Window object.

The reason this is useful to me is that I often have complex binding handlers that have their own self-contained functions. Often I'd wrap all the handler's logic inside a closure (which returns the handler), but it's much nicer to be able to save a level of indentation (or not have to type `var self = ko.bindingHandlers.foo;`).