I have a JavaScript class that looks like this:
function SomeFunction() { this.doSomething(function() { this.doSomethingElse(); });
It's also worth mentioning that the next version of ECMAScript (the language spec for JavaScript) is going to introduce Function.bind(), which will let you specify a permanent context for a function.
Function.bind()