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??
Asked
Active
Viewed 547 times
1

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

hjindal
- 588
- 7
- 16
-
Are you a webpage or are you a browser extension? – i_am_jorf May 29 '12 at 21:09
1 Answers
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
-
-
No, I know nothing about IE helper objects. It is generally not a good idea to mix questions about completely different browsers in one question - only few people know all of them. – Wladimir Palant May 30 '12 at 07:24