Hey guys, I came across what looks like unusual results in Gecko and was wondering if someone could explain it.
Essentially, if an attribute is set in a js object to be a native window function (such as alert or prompt), then executed by calling that object attribute, it errors out in Gecko but runs normally in IE. I'm curious as to why that would be. My thoughts are that perhaps it is a reserved top-level keyword and thus the reference cannot be saved as a local attribute of an object, or perhaps that native (or inbuilt) window functions and attributes cannot be overwritten or cloned (or the reference cloned) in any way as a security measure - but this is pure guesswork.
I would have thought that the object-oriented nature of the language would mean that it is possible to manipulate functions/objects regardless of their native position within the framework of the DOM - except the framework objects such as window, document, element etc.