diff options
Diffstat (limited to 'content_scripts')
-rw-r--r-- | content_scripts/notify.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts index 2c71efc2e..0e723b52c 100644 --- a/content_scripts/notify.ts +++ b/content_scripts/notify.ts @@ -149,7 +149,11 @@ namespace TalerNotify { } let responder = (msg?: any) => { let fullMsg = Object.assign({}, msg, {callId}); - let evt = new CustomEvent(type + "-result", {detail: fullMsg}); + let opts = { detail: fullMsg }; + if ("function" == typeof cloneInto) { + opts = cloneInto(opts, document.defaultView); + } + let evt = new CustomEvent(type + "-result", opts); document.dispatchEvent(evt); }; handler(e.detail, responder); |