use cloneInto when passing objects from content_script to page
This commit is contained in:
parent
76bdfcb989
commit
fda241d74d
@ -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 {
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user