Skip to content

Instantly share code, notes, and snippets.

@FranciscoMarinho
Last active January 21, 2021 22:13
Show Gist options
  • Select an option

  • Save FranciscoMarinho/7ccecdf08c3dd18d8deb7d5af232da8c to your computer and use it in GitHub Desktop.

Select an option

Save FranciscoMarinho/7ccecdf08c3dd18d8deb7d5af232da8c to your computer and use it in GitHub Desktop.
@HostListener('window:DOMContentLoaded', ['$event'])
receiveInit() {
if (this.navigator.presentation.receiver) {
this.navigator.presentation.receiver.connectionList.then((connectionList:any) => {
connectionList.connections.map((connection: any) => {
this.connection = connection;
this.connection.onmessage = (event: MessageEvent) => this.handlerOnmessage(event);
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment