Gracefully handle legacy message recipients.
This commit is contained in:
parent
8c739b064c
commit
71c82b5084
|
@ -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};
|
||||
|
|
Loading…
Reference in New Issue