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);