Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们试图在我们的扩展中有多个弹出框,我们需要知道弹出框何时关闭,以便我们可以更改按钮上的弹出框值。
有听众吗?
当弹出框关闭时,window对象会收到一个blur事件。
window
blur
因此,弹出窗口中的类似内容将起作用:
window.onblur = function () { // do stuff when popover is closed };