taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit fda241d74d5c1c39203b64da676c684d4dc9d800
parent 76bdfcb9896ddc0086fc2126a1e4a6f9bed2b13d
Author: tg(x) <*@tg-x.net>
Date:   Wed,  5 Oct 2016 00:02:04 +0200

use cloneInto when passing objects from content_script to page

Diffstat:
Mcontent_scripts/notify.ts | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 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 +}