Closed Bug 794574 Opened 12 years ago Closed 6 years ago

PageMod should have a port property

Categories

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

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: evold, Unassigned)

References

Details

It should be possible to send a message to all open/unfrozen workers associated with a page mode like so:

var mod = PageMode({..});
mod.port.emit('poke', 'get to work!');
Does the change in comment 1 sound ok ?
Flags: needinfo?(rFobic)
Whiteboard: [good first bug]
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #1)
> Does the change in comment 1 sound ok ?

Yeah it sounds like it would match other APIs in the behavior.

I doubt it's a good first bug though.
Flags: needinfo?(rFobic)
Whiteboard: [good first bug]
Assignee: nobody → zer0
+1 for this. I have to use a gobal in my add-on to store the page-worker for my pageMod. Maybe don't call it mod.port.emit() though. It can be confusing, as in other situations port sends to one worker only. maybe call it mod.port.broadcast().
Whatever it end up being called, it would be really nice to have it
Hey Matteo, are you working on this one? if not could you please unassign yourself.
Flags: needinfo?(zer0)
Assignee: zer0 → nobody
Flags: needinfo?(zer0)
Add-on SDK is no longer supported so resolving bugs as INCOMPLETE
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.