Closed Bug 1079540 Opened 10 years ago Closed 10 years ago

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

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wbamberg, Assigned: irakli)

Details

Attachments

(1 file)

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)
Attached file Make ports optional.
Flags: needinfo?(rFobic)
Attachment #8555600 - Flags: review?(evold)
Attachment #8555600 - Flags: review?(evold) → review+
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
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: