how to receive window postmessage event in angular 9

Solutions on MaxInterview for how to receive window postmessage event in angular 9 by the best coders in the world

showing results for - "how to receive window postmessage event in angular 9"
Sullivan
04 Sep 2016
1window.addEventListener("message", () => {
2   this.receiveMessage();
3}, false)
4
Anjali
24 Mar 2020
1receiveMessage: any = (event: any) =>  {
2  //...
3}
4
Abigail
15 Oct 2016
1constructor(private _authService: AuthService, private _router: Router) { 
2   if (window.addEventListener) {
3     window.addEventListener("message", this.receiveMessage.bind(this), false);
4   } else {
5      (<any>window).attachEvent("onmessage", this.receiveMessage.bind(this));
6   }
7}
8