summaryrefslogtreecommitdiff
path: root/src/lib/Messages.js
diff options
context:
space:
mode:
authorhackademix2018-09-14 07:18:10 +0200
committerhackademix2018-09-14 07:18:10 +0200
commit71c82b50849d8d70bb5bc410fcdf814837358143 (patch)
treef2ccbf78e9a1b4089fde9ce1cc2aa973cf435fce /src/lib/Messages.js
parent8c739b064c14b82011b08d9080019fb4615b2ec5 (diff)
downloadnoscript-71c82b50849d8d70bb5bc410fcdf814837358143.tar.gz
noscript-71c82b50849d8d70bb5bc410fcdf814837358143.tar.xz
noscript-71c82b50849d8d70bb5bc410fcdf814837358143.zip
Gracefully handle legacy message recipients.
Diffstat (limited to 'src/lib/Messages.js')
-rw-r--r--src/lib/Messages.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/Messages.js b/src/lib/Messages.js
index 1c11870..de11e66 100644
--- a/src/lib/Messages.js
+++ b/src/lib/Messages.js
@@ -59,6 +59,7 @@
},
async send(name, args = {}, recipientInfo = null) {
args.__meta = {name, recipientInfo};
+ args._messageName = name; // legacy protocol, for embedders
if (recipientInfo && "tabId" in recipientInfo) {
let opts;
if ("frameId" in recipientInfo) opts = {frameId: recipientInfo.frameId};