From 657b4970c759a7232e45e7ecebfe0b0b07d2f9a6 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 5 Jun 2024 15:08:39 -0500 Subject: [PATCH] check for ServiceWorker (#42) --- src/widget.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widget.ts b/src/widget.ts index 0385a27..8864744 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -117,7 +117,8 @@ export class DeephavenView extends DOMWidgetView { if ( source == null || source instanceof MessagePort || - source instanceof ServiceWorker || + (typeof ServiceWorker !== 'undefined' && + source instanceof ServiceWorker) || source !== this.iframe.contentWindow ) { log.debug('Ignore message, invalid event source', source);