Open Bug 1774444 Opened 2 years ago Updated 2 years ago

Extract WebDriver BiDi JavaScript type definitions to a shared module

Categories

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

task
Points:
1

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [webdriver:backlog])

See the discussion at https://phabricator.services.mozilla.com/D148907#inline-822080

At the moment we define types in BiDi MessageHandler modules, but since some types can be used in several modules, it probably makes sense to have them in a single shared module (not MessageHandler module, regular module).

We should discuss about which types should move there, and if a single file is ok or if we should think about a split.

Example types: https://searchfox.org/mozilla-central/rev/2398ab33adcea896838b3da678ff6480dbb98b9a/remote/webdriver-bidi/modules/root/browsingContext.jsm#184-199

We also have enums, which can be useful to share. Maybe that's what :whimboo had in mind anyway, to share both types and enums. Given that our typedefs are only comments at the moment, it would make sense to at least also have enums?

Summary: Extract WebDriver BiDi type definitions to a shared module → Extract WebDriver BiDi JavaScript type definitions to a shared module

We should move all types and enums to a dedicated folder under remote/webdriver-bidi.
Let's keep one individual file per module name.

Eg a layout could be

  • remote/webdriver-bidi/types/browsingContext.js
  • remote/webdriver-bidi/types/log.js
  • remote/webdriver-bidi/types/script.js
  • ...
Points: --- → 1
Priority: -- → P3
Whiteboard: [webdriver:triage] → [webdriver:backlog]
Depends on: 1785284
You need to log in before you can comment on or make changes to this bug.