(function() {console.log(this)}.bind('Hello world'))(); // this refers
to Hello world
(function() {console.log(this)}.pass('Hello world'))(); // this refers
to window
(function(message) {console.log(message)}.pass('Hello world'))(); //
this refers to window but logs Hello worldOn Jan 24, 6:00 pm, Roman Land <[email protected]> wrote: > Hi, > > After reading the code I understand that .pass and .bind are essentially the > same, the difference being that with .pass the bind can be null. > Although the binding is null the original object closure is still lost in > the current context, example:http://mootools.net/shell/ck72p/ > > I dont know if its possible but I am looking for a way to pass an argument > at function deceleration time and get it as part of the "this" or as an > argument, is there a way to achieve this? > > Thanks! > Roman > > -- > --- > "Make everything as simple as possible, but not simpler." > > - Albert Einstein
