[WAISY-0] tesiting containr communication

This commit is contained in:
Peter Skrlj
2019-03-08 09:36:02 +01:00
parent 8df7c72b25
commit a495583a91

View File

@@ -26,12 +26,23 @@ export class TestingContainerComponent implements OnInit {
}
createEvent() {
try {
(window as any).webkit.messageHandlers.test.postMessage('Hello, world!');
} catch (error) {
console.error(error);
}
window.postMessage(
{
opencamera: true
},
location.origin
);
window.postMessage(
{
opencamera2: true
},
'*'
);
}
fakeScanEvent() {