function myLittleFunction() {

   // do my changes to the page

   spanElement.addEventListener("click", myLittleFunction(), false);

}

Two problems:

- With the parens after myLittleFunction in the addEventListener call, you're calling mLF instead of passing a reference to it to aEL. When it calls mLF, it tries to add the listener, which calls mLF, which... You've got an infinite recursion, which is why the browser seems to hang. - If you remove the parens, it should add the listener, but the listener will just be the function that adds the listener, which probably isn't what you want. You need a second function that's the actual listener.

Brian

--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to