我怎样才能捕获文件> Firefox 插件中的打印事件?
我想创建一个 Firefox 附加组件,用它捕获“文件 > 打印”浏览器事件以停止它。有谁知道如何赶上这个活动吗?我在 browser.xul 文件中找到命令:
<command id="cmd_print" oncommand="goDoCommand('cmd_print')"/>
Can I catch goDoCommand('cmd_print') event?
I want to create a Firefox add-on with which I catch the "file > print" browser event for stop it. Does anyone know how to catch this event? I find in browser.xul file the command:
<command id="cmd_print" oncommand="goDoCommand('cmd_print')"/>
Can I catch goDoCommand('cmd_print') event?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更简单的方法是简单地覆盖该命令,使其不执行任何操作。
在您的 XUL 覆盖层中,执行以下操作:
这应该不会导致执行 cmd_print 时发生任何事情。
An easier thing to do would be to simply overlay the command so it does nothing.
In your XUL overlay, do this:
This should cause nothing to happen when cmd_print is executed.