Answers for "how to receive window.postmessage event in angular 9"

0

how to receive window.postmessage event in angular 9

window.addEventListener("message", () => {
   this.receiveMessage();
}, false)
Posted by: Guest on August-18-2020
0

how to receive window.postmessage event in angular 9

constructor(private _authService: AuthService, private _router: Router) { 
   if (window.addEventListener) {
     window.addEventListener("message", this.receiveMessage.bind(this), false);
   } else {
      (<any>window).attachEvent("onmessage", this.receiveMessage.bind(this));
   }
}
Posted by: Guest on August-18-2020
0

how to receive window.postmessage event in angular 9

receiveMessage: any = (event: any) =>  {
  //...
}
Posted by: Guest on August-18-2020

Code answers related to "how to receive window.postmessage event in angular 9"

Code answers related to "Javascript"

Browse Popular Code Answers by Language