Add emitEventForBrowsingContext method to a base RootBiDiModule class
Categories
(Remote Protocol :: WebDriver BiDi, task, P3)
Tracking
(firefox131 fixed)
Tracking | Status | |
---|---|---|
firefox131 | --- | fixed |
People
(Reporter: Sasha, Assigned: temidayoazeez032, Mentored)
References
Details
(Whiteboard: [lang=js][webdriver:m12][webdriver:external][webdriver:relnote])
Attachments
(1 file)
A lot of browsingContext events are sent from the parent process and in order to do this we always write the same code:
// This event is emitted from the parent process but for a given browsing
// context. Set the event's contextInfo to the message handler corresponding
// to this browsing context.
const contextInfo = {
contextId: browsingContextId,
type: lazy.WindowGlobalMessageHandler.type,
};
this.emitEvent(
eventName,
eventPayload,
contextInfo
);
This code could me moved to a method in the base RootBiDiModule class. The proposed name of this method is emitBrowsingContextEvent
.
Hm, isn't that specific to the browsing context module and a general helper there would be a better place?
Comment 2•1 year ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #1)
Hm, isn't that specific to the browsing context module and a general helper there would be a better place?
Re-reading the method name I suggested I thought "it's probably misleading", and looks like I was right :)
A better name would probably be emitEventForBrowsingContext. It's basically for any parent process module which needs to emit an event for a specific context. Eg network module can also use it.
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 3•1 year ago
|
||
As soon as dependency bug1850682 is fixed, we should set this bug as mentored.
Updated•2 months ago
|
Comment 6•2 months ago
|
||
Thanks for picking this up!
Updated•2 months ago
|
Comment 8•2 months ago
|
||
bugherder |
Comment 9•2 months ago
|
||
Great work, Dan! It's fantastic to see us starting to share methods across the different BiDi root module classes. If you're interested in continuing, please let us know or join us on Matrix in the #webdriver channel. This will help us find a suitable next bug for you, if you haven't already found one, and allow you to learn and contribute more. Thanks!
Description
•