Triggering click events from within a FF sandbox

Posted by user220591 on Stack Overflow See other posts from Stack Overflow or by user220591
Published on 2010-06-14T22:56:50Z Indexed on 2010/06/14 23:02 UTC
Read the original article Hit count: 168

Filed under:
|
|

I am trying to trigger a click event on an element on a page from within a Firefox sandbox. I have tried using jQuery's .click() as well as doing:

var evt = document.createEvent("HTMLEvents");
evt.initEvent("click", true, false );
toClick[0].dispatchEvent(evt);

Has anyone been able to trigger a click event on a page in the browser through a sandbox? I can get the DOM element fine, but triggering the event is a different story.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about firefox-addon