[Greasemonkey] creating your own events

Matt Labrum darktempler at gmail.com
Sun Feb 19 13:57:07 EST 2006

Hello i cant seem to be able to create custom events like i want to be able
to fire custom events that i can listen for with document.addEventListener

Ive been googleing and found the following code but it dosnt seem to work


    var evt = document.createEvent("Events");
    evt.initEvent("customEventThing", false, true);

it fails with the error of
Error: [Exception... "Unexpected error"  nsresult: "0x8000ffff

does anyone know of a way to make this work , or another way to fire custom

More information about the Greasemonkey mailing list