Patch: fix for not accounting applets with onLoad events
Koos Vriezen
koos.vriezen at xs4all.nl
Thu Nov 7 22:45:11 GMT 2002
On Thu, 7 Nov 2002, Koos Vriezen wrote:
> Hi,
>
> Pages with applets fires onLoad events before applets are loaded. The
> attached patch fixes that. This also keeps the wheel spinning until they
> are loaded.
> It also adds some 'const' modifiers on a few KJavaApplet member functions.
>
> Btw. I noticed that applets declared as <APPLET NAME="myapplet" ..> can't
> be accessed by using 'document.myapplet' anymore. I thought that that used
> to be possible before, no?
Attached patch restores this old behaviour. Why was it changed?
>
> Regards,
>
> Koos Vriezen
>
-------------- next part --------------
Index: ecma/kjs_html.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.213
diff -u -3 -p -r1.213 kjs_html.cpp
--- ecma/kjs_html.cpp 2002/11/07 13:45:17 1.213
+++ ecma/kjs_html.cpp 2002/11/07 22:33:35
@@ -244,6 +244,15 @@ Value KJS::HTMLDocument::tryGet(ExecStat
return Value(Window::retrieve(kp));
}
+ // Check for applets with name==propertyName, return item or list if found
+ list = new DOM::NamedTagNodeListImpl( doc.handle(), ID_APPLET, propertyName.string() );
+ len = list.length();
+ if ( len == 1 )
+ return getDOMNode( exec, list.item( 0 ) );
+ else if ( len > 1 )
+ return getDOMNodeList( exec, list );
+
+
const HashEntry* entry = Lookup::findEntry(&HTMLDocumentTable, propertyName);
if (entry) {
switch (entry->value) {
More information about the kfm-devel
mailing list