Can you detect when a Safari popover closes?
问题 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