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.
有没有办法检测 Safari 扩展的弹出窗口何时关闭。类似于弹出窗口关闭时触发的事件?我没有在 API 文档中看到任何事件侦听器,但是否有解决方法?弹出窗口关闭后执行清理操作会很有帮助。
您可以在下一个弹出窗口打开之前进行清理:
safari.application.addEventListener('popover', function(event) { event.target.contentWindow.location.reload(); }, true);