Scope in event handlers

David Faure faure at kde.org
Mon Apr 18 13:59:45 CEST 2005


On Friday 11 March 2005 23:18, Maciej Stachowiak wrote:
> [...] In other words, 
> the scope mangling is done statically at the time the handler is 
> declared in an attribute, and even if you move it to another node it 
> won't change.

Indeed. Thanks for the info.

> Here is my patch to do this:

Applied.

> And here's a patch that is needed to correct a mistake in my original 
> patch (it was wrong about handling body elements, since they put their 
> scope         [truncated sentence, but I see what you mean :)]

Applied.

A related topic: kjs_proxy.cpp has now become a useless intermediate layer.
It used to be necessary when dlopening the code in the ecma subdir (kjs_html.so iirc) 
from libkhtml, but we don't do that anymore (it broke with rtti and DOM exceptions).
So this intermediate layer can certainly be cleaned up now, at least the interface/impl 
thing, or even moving all that code to e.g. kjs_binding.h's ScriptInterpreter and 
getting rid of the "proxy" intermediate. What do you think?

If we perform that cleanup here, would you apply the patch to Safari too? (If not, I don't
want to do something that will make it harder to merge patches later on).
Or vice versa, do you feel like cleaning it up? :-)

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Khtml-devel mailing list