1

Is there a way to HOOk browser commands in IE/FF/Chrome Like Office applications? we can hook keyboard events, but how to hook menu items??

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
hjindal
  • 588
  • 7
  • 16

1 Answers1

1

The answer for Chrome: no. The answer for Firefox: yes. There is a <xul:command> element in the browser window with id cmd_print. Attach a listener for the command event to it and it will be called whenever the user invokes that menu item or presses Ctrl-P. There is also a similar element with id Browser:SavePage.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126