Felipe Gasper wrote:
<snip>
I've got some code that works in Moz and follows good
design etc., but Safari ignores it, and Konq tells me
that it's barfing on the HTMLInputElement.prototype stuff.
<snip>
As far as I am aware Mozilla/Gecko is the only type of browsers that
exposes prototypes for the DOM Nodes to javascript. Which is to be
expected as they are host objects and ECMA 262 makes no requirement that
host objects exhibit any specific behaviour.
In addition - HTMLInputElement - is defined by the W3C HTML DOM as an
interface so it is only an implementation decision that there would be a
corresponding "class" that could be prototyped available in the system.
The DOM Nodes on Opera 7, for example, claim that their constructor is -
function Object() { [native code] } - which would imply that Opera is
implementing W3C DOM interfaces by augmenting objects rather than by
inheritance (prototype-based or otherwise), and there is no particular
reason why they shouldn't.
Richard.