Created
September 27, 2019 13:50
-
-
Save notpushkin/7e9cb2925e1600f623c2f36b078c3412 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function waitForPopupClosed(popup) { | |
return new Promise((resolve, reject) => { | |
const popupTick = setInterval(function() { | |
if (popup.closed) { | |
clearInterval(popupTick); | |
resolve(); | |
} | |
}, 500); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment