Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. function waitForPopupClosed(popup) {
  2. return new Promise((resolve, reject) => {
  3. const popupTick = setInterval(function() {
  4. if (popup.closed) {
  5. clearInterval(popupTick);
  6. resolve();
  7. }
  8. }, 500);
  9. });
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement