Can you detect when a Safari popover closes?

可紊 提交于 2019-12-30 10:59:23

问题


We're trying to have multiple popovers in our extension and we need to know when the popover closes so we can change the popover value on the button.

Is there any listener for that?


回答1:


When the popover is closed, the window object receives a blur event.

So, something like this in the popover will work:

window.onblur = function () {
    // do stuff when popover is closed
};


来源:https://stackoverflow.com/questions/18860101/can-you-detect-when-a-safari-popover-closes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!