在标签之间切换之前捕获事件 [英] Capture an event before shifting between tabs

查看:109
本文介绍了在标签之间切换之前捕获事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个Firefox插件,我需要捕获任何事件(如果可以的话),这是在从一个标签移出到另一个之前触发的。我在ProgressListener中尝试了onLocationChange方法,但只有在用户登陆到第二个选项卡后才捕获事件。我需要一个事件,可以捕捉这个活动就在用户即将从一个标签移动到另一个。



有什么建议?



Kapil

解决方案

Tab选项将在选中选项卡之后触发,因此不起作用。



我有同样的问题,只有我想在标签打开之前触发一个事件,以阻止它打开。



您是否尝试在标签栏的标签上设置onclick事件?


I am writing a firefox addon for which I need to capture any event (if I can) that is triggered just before moving out from one tab to another. I tried onLocationChange method in the ProgressListener, but that captures the event only after the user has landed to the second tab. I need an event that can capture this activity just before the user is about to move out from one tab to another.

Any suggestions?

Kapil

解决方案

TabSelect will fire after the tab has been selected, so that won't work.

I have this same problem, only I'd like to trigger an event before a tab opens, so as to stop it opening.

Have you tried setting an onclick event on the tabs in the tab bar?

这篇关于在标签之间切换之前捕获事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆