dev/panel's postMessage makes `ports` a mandatory argument, when it should be optional

RESOLVED FIXED

Status

defect
P1
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: wbamberg, Assigned: irakli)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

5 years ago
In dev/panel, the add-on can send messages to the panel document using panel.postMessage. This can accept a list of MessagePorts:

this.postMessage("my message", [port])

However, `ports` should be an optional argument. That is, panel should be able to do:

this.postMessage("my message")

But it can't: the module requires the `ports` argument.
Priority: -- → P1
Hey Irakli, I'm not sure if you want to work on this, if not could you please unassign yourself.
Flags: needinfo?(rFobic)
Flags: needinfo?(rFobic)
Attachment #8555600 - Flags: review?(evold)
Attachment #8555600 - Flags: review?(evold) → review+

Comment 3

4 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/d52ba0b71ff664f997c660d4e476d8628c80e7ab
Merge pull request #1846 from Gozala/bug/mandatory-port@1079540

Bug 1079540 - Make ports argument in postMessage optional. r=@erikvold
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.