[Greasemonkey] Re: dispatchEvent creates an error

Nikolas Coukouma lists at atrus.org
Tue Aug 23 17:35:09 EDT 2005


Mark Pilgrim wrote:

>On 8/23/05, Andre <gm at andrecgn.de> wrote:
>  
>
>>right, but the link in my original mail points to an example:
>>http://www.mozilla.org/docs/dom/domref/dom_el_ref36.html#1028419
>>
>>Example:
>>        b = document.getElementById("button1");
>>        res = b.dispatchEvent("click");
>>    
>>
>
>Wow, by an amazing coincidence, I was researching this exact question
>last night.  Here is the most helpful link I found:
>
>http://lists.evolt.org/archive/Week-of-Mon-20040301/156228.html
>
>Basically, the Mozilla documentation is simply wrong.  Like wildly wrong.
>
I've updated the wiki version with a correct example and added a quick
page on createEvent:
http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent
http://developer.mozilla.org/en/docs/DOM:document.createEvent

The XUL Planet docs are correct, if terse, because they were generated
from the source a while ago:
http://www.xulplanet.com/references/objref/HTMLDocument.html#method_createEvent
http://www.xulplanet.com/references/objref/HTMLDocument.html#method_dispatchEvent

-Nikolas


More information about the Greasemonkey mailing list