aboutsummaryrefslogtreecommitdiff
path: root/content_scripts
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-10-05 00:02:04 +0200
committertg(x) <*@tg-x.net>2016-10-05 00:02:04 +0200
commitfda241d74d5c1c39203b64da676c684d4dc9d800 (patch)
treeaf9eccc4471ec1aac432c396c1405fbf06e08191 /content_scripts
parent76bdfcb9896ddc0086fc2126a1e4a6f9bed2b13d (diff)
downloadwallet-core-fda241d74d5c1c39203b64da676c684d4dc9d800.tar.xz
use cloneInto when passing objects from content_script to page
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/notify.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts
index ed704aaf0..64f65e7e5 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);
@@ -319,4 +323,4 @@ namespace TalerNotify {
});
});
}
-} \ No newline at end of file
+}