Re: <script> as handler for XML events

Jonas Sicking <[email protected]> Mon, 17 Jul 2006 11:26:03 -0700
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
Chris Cross wrote:
> <handler> seems to be a reasonable way to go and I would be interested 
> in working on it. Presumably it could inherit much of its behavior from 
> <script>. Can you provide some high level directions for a newbie?

I would suggest looking at nsSVGScriptElement to start off with. 
nsHTMLScriptElement has a lot of the same code, but it also has a bunch 
of cruft you are not interested in.

Though you're going to have to modify it quite a bit since it interacts 
with the script engine in such a way that the script is automatically 
loaded and executed, whereas you just want to do the former.

But at least it'll point you towards the right APIs.

/ Jonas