[Project_owners] Programmatically open the context menu

Todd Long longfocus at gmail.com
Thu Feb 9 22:30:52 EST 2006

Is it possible to programmatically open the context menu
(contentAreaContextMenu)? Basically, I just want to have the ability to send
a right-click MouseEvent to the tabbrowser when a certain action is
performed. I wasn't quite sure how to piece the code below to achieve this

In my code, I have an event listener which is fired when the mouse is
clicked but I want it so that it will change the button type to 2 (right

function onClick(aEvent) {
  var evt = document.createEvent("MouseEvent");
  evt.initMouseEvent("click", 1, 1, window, 1, 10, 50, 10, 50, 0, 0, 0, 0, 2,


Any help would be great or point me to some documentation. Thank you very
much in advance!

- Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060209/efe0e5eb/attachment.htm

More information about the Project_owners mailing list