Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function waitForPopupClosed(popup) {
- return new Promise((resolve, reject) => {
- const popupTick = setInterval(function() {
- if (popup.closed) {
- clearInterval(popupTick);
- resolve();
- }
- }, 500);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement