Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. const iframe = document.createElement("iframe");
  2. document.body.appendChild(iframe);
  3.  
  4. const timeout = iframe.contentWindow.setTimeout;
  5. document.body.removeChild(iframe);
  6.  
  7. const plainTimeout = timeout.bind(window);
  8. export const runOutsideZone =
  9. (fn, delay) => plainTimeout(fn, delay);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement