hi,

this is a bit off topic - but as there are surely quite a bit
javascript gurus around...

lets assume i have defined the following method on the Function object.


Function.prototype.foo = function(){}

now i define a few other functions

function xxx(){};
function yyy(){};

and i call foo on them. sofar no big surprise. foo
gets called. i am happy.

xxx.foo();
yyy.foo();

NOW i reverse the order of the foo-calls

xxx.foo();
yyy.foo();

function xxx(){};
function yyy(){};

that is. i call foo before defining the functions to call
them on. the BIG surprise is, that this works as well.

tested on ff 1.0.7, ie 6.0 sp2 and ie 7.0beta2



yozzeff


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to