Closed Bug 1850682 Opened 1 year ago Closed 2 months ago

Add a base RootBiDiModule class

Categories

(Remote Protocol :: WebDriver BiDi, task, P3)

task
Points:
2

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: jdescottes, Assigned: temidayoazeez032, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [lang=js][webdriver:m12][webdriver:external][webdriver:relnote])

Attachments

(2 files)

Similar to the WindowGlobalBiDiModule, we could create a base class for all webdriver-bidi root modules.

One of the APIs which could live there is hasListener or isListeningForEvent, which would be a shortcut for

this.messageHandler.eventsDispatcher.hasListener(eventName, contextInfo);
Mentor: jdescottes
Points: --- → 2
Priority: -- → P3
Whiteboard: [lang=js]

Hi, is this still up for grap. I will like to work on the issue.

(In reply to Dan from comment #1)

Hi, is this still up for grap. I will like to work on the issue.

Hi Dan! Yes sure this is still available.

The goal is to create a new base class similar to WindowGlobalBiDiModule, but called RootBiDiModule. You can create it under remote/webdriver-bidi/modules/ as well. Make sure to register it in the corresponding jar.mn.

We have other bugs to add more methods to this RootBidiModule class, but you can still start with the hasListener method suggested above.
Now one thing to note is that we need to be careful with public methods on BiDi modules, because they all become part of the API exposed to WebDriver clients. We need to prefix it with _ to avoid this, so please name it _hasListener.

Then all the modules under remote/webdriver-bidi/modules/root should extend this new class. And the network module can start using the new _hasListener method.

The bug will automatically be assigned to you when you submit a patch, you can take a look at the doc at https://firefox-source-docs.mozilla.org/setup/index.html to get started, and don't hesitate to ask here or on matrix if you have any question.

Flags: needinfo?(temidayoazeez032)

Yeah, thanks for the response @(In reply to Julian Descottes [:jdescottes] from comment #2)

(In reply to Dan from comment #1)

Hi, is this still up for grap. I will like to work on the issue.

Hi Dan! Yes sure this is still available.

The goal is to create a new base class similar to WindowGlobalBiDiModule, but called RootBiDiModule. You can create it under remote/webdriver-bidi/modules/ as well. Make sure to register it in the corresponding jar.mn.

We have other bugs to add more methods to this RootBidiModule class, but you can still start with the hasListener method suggested above.
Now one thing to note is that we need to be careful with public methods on BiDi modules, because they all become part of the API exposed to WebDriver clients. We need to prefix it with _ to avoid this, so please name it _hasListener.

Then all the modules under remote/webdriver-bidi/modules/root should extend this new class. And the network module can start using the new _hasListener method.

The bug will automatically be assigned to you when you submit a patch, you can take a look at the doc at https://firefox-source-docs.mozilla.org/setup/index.html to get started, and don't hesitate to ask here or on matrix if you have any question.

Thanks for the response.

Flags: needinfo?(temidayoazeez032)
Assignee: nobody → temidayoazeez032
Status: NEW → ASSIGNED
Attachment #9417606 - Attachment description: Bug 1850682 - Add a base RootBiDiModule class - 'Julian Descottes' → Bug 1850682 - Add a base RootBiDiModule class
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3e21ef9974f Add a base RootBiDiModule class r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Whiteboard: [lang=js] → [lang=js][webdriver:m12][webdriver:external]
Whiteboard: [lang=js][webdriver:m12][webdriver:external] → [lang=js][webdriver:m12][webdriver:external][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: