Version: (using KDE KDE 3.0.5)
Installed from: Compiled From Sources
Compiler: gcc version 2.95.3 20010315 (SuSE)
Having a script like this
var divNodes = document.getElementsByTagName( 'div' );
var node = divNodes.item(0);
alert( node.nodeType + " " + node.ELEMENT_NODE );
one would expect a message box with the content '1 1'. But it shows '1 undefined'.
Here the spec
Node.ELEMENT_NODE (note the capital N) works and could be used as a workaround.
Seems like the Node instances don't inherit this part of the interface.
On Sunday 02 July 2006 18:11, Maks Orlovich wrote:
> SVN commit 557310 by orlovich:
Forgot to forward it to bugs... And note that this will probably need some
additions to support everything, but they should be pretty easy...
> A bunch of DOM changes we'll need to support the new yahoo mail
> and ATLAS stuff; this is neccessary but not sufficient, since they
> also heavily use setters/getters, which I am not sure we want to support in
> 3.5.x... (But this stuff is standalone)
> 1. Provide some emulation of mozillaisms like Node.prototype = ... .
> These are incomplete, but should hopefully cover the important stuff.
> Related to that, fix HTMLDocument to use a proper prototype.
> 2. Merge from Apple's tree: support the no-op debugger; statement,
> it at least seems to be used by yahoo...
> 3. Readonly support for characterSet property.
> 4. Fix crash on reading some properties of mouse events that weren't
> dispatched --- noticed on testing this stuff.
> M +49 -0 khtml/ecma/kjs_binding.h
> M +2 -0 khtml/ecma/kjs_css.cpp
> M +2 -0 khtml/ecma/kjs_css.h
> M +30 -74 khtml/ecma/kjs_dom.cpp
> M +8 -12 khtml/ecma/kjs_dom.h
> M +33 -51 khtml/ecma/kjs_events.cpp
> M +1 -11 khtml/ecma/kjs_events.h
> M +20 -21 khtml/ecma/kjs_html.cpp
> M +2 -0 khtml/ecma/kjs_html.h
> M +20 -2 khtml/ecma/kjs_window.cpp
> M +3 -1 khtml/ecma/kjs_window.h
> M +864 -841 kjs/grammar.cpp
> M +57 -55 kjs/grammar.h
> M +13 -0 kjs/grammar.y
> M +1 -1 kjs/keywords.table
> M +19 -1 kjs/lookup.h