Once that function receives the reference it is just a reference to a function object and not a method of an object
It would not necessarily work exactly the same for native code functions (hence it working with IE) but calling - func(arg); - for a javascript method would execute it in the global scope and result in the - this - keyword referring to the window object instead of - elm.parentNode -
Apparently, Mozilla's DOM methods need a context to execute correctly, that is, you cannot pass the function without the appropriate "this" value being set (this makes sense, since DOM object tend to be prototyped in Mozilla, but not in IE, which therefore probably starts from internal hash to resolve the property and re-set the "this" value)
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.