Closed aklinker1 closed 1 year ago
I think maybe it's better to add namespace option in defineWindowMessaging
to prevent collision with other ext.
I can add that.
I think maybe it's better to add namespace option in
defineWindowMessaging
to prevent collision with other ext.
I'm just going to use browser.runtime.id
internally for this. It should be unique across extensions on all browsers, preventing accidental communication. @devnomic with that, do you still think a namespace option for defineWindowMessenger
is required?
Edit: Unless you want to communicate with other extensions, that would disallow that. I think I'll add an optional namespace
option that defaults to browser.runtime.id
, but it can be overrided to something else if needed. That should cover all cases.
I think maybe it's better to add namespace option in
defineWindowMessaging
to prevent collision with other ext.I'm just going to use
browser.runtime.id
internally for this. It should be unique across extensions on all browsers, preventing accidental communication. @devnomic with that, do you still think a namespace option fordefineWindowMessenger
is required?Edit: Unless you want to communicate with other extensions, that would disallow that. I think I'll add an optional
namespace
option that defaults tobrowser.runtime.id
, but it can be overrided to something else if needed. That should cover all cases.
Yeah that would be the best.
Pulled the new messengers features out into #33
Overview
Refactor to make #27 easier to implement. I'm now shared all the
defineMessenger
logic and types.