Re: dispatchEvent on svg node in firefox
"Volker Gersabeck" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Message-ID | <[email protected]> |
I just want to post a solution to my problem: Thanks to Boris we discovered that my problem was that I want to trigger a default handler to an <a href>-tag, which is prohibited by Firefox unless the script is running as a chrome:// app (e.g. a firefox extension). For the html button I used an onclick handler, which can be triggered by my script. Therefore, the problem was not svg vs. html but default handler (<a href>) vs. onclick handler. Today I found a very handsome solution. John Resig blogged about the new fireunit test framework (http://ejohn.org/blog/fireunit/). This is an add-on to firebug. Besides offering unit testing capabilities, it also offers some event trigger like mousedown, click, focus, and key events. Therefore, I don't have to write my own firefox extension but can just use a call to fireunit.click( domNode ) to trigger my click event. It is not compatible with other browsers but allows for a very simple solution. kind regards Volker -- RapidRabb.it GmbH Kirchhofstr. 43 12055 Berlin Tel. +49 30 6920 3773 [email protected] www.rapidrabb.it Accelerate your Prototyping! RapidRabb.it GmbH Sitz der Gesellschaft: Berlin Registergericht Berlin-Charlottenburg, HRB 115010 Geschäftsführer: Philipp Huy On Thu, Dec 11, 2008 at 8:52 PM, Boris Zbarsky <[email protected]> wrote: > Volker Gersabeck wrote: > >> well, in my case, with html it works. >> > > I'd love to see the testcase. It doesn't work over here, and code > inspection says it shouldn't work. If it works, it's a security bug. > > what I might add to the description of my problem: the xhtml + svg is >> contained within an iFrame and the Javascript runs in the context of the >> outer file (the one that contains the iFrame). But i'm not sure, whether >> this makes my code privileged. >> > > No. > > Btw: could you please write a sentence about >> what privileged code is, or just point me to a page with some >> explanations? >> That would be great. >> > > Privileged code is either part of the browser user interface (e.g. an > extension) or code that has been granted UniversalXPConnect privileges via > enablePrivilege. I'm pretty sure we have some documentation on the latter > that's findable via Google, but I'd have to look for it. > > > -Boris > _______________________________________________ > dev-tech-svg mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-svg >