Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. waitForUserInteraction(): Promise<void> {
  2.     const deferred = new Deferred<void>();
  3.     setTimeout(() => {
  4.       if (this.userInteractionDeferreds.length === 0) {
  5.         this.subscribeUserInteractionEvents();
  6.       }
  7.       this.userInteractionDeferreds.push(deferred);
  8.     }, 500);
  9.     return deferred.promise;
  10.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement