Add a "WindowManager.supportsWindows()" helper to more easily check for multiple windows support
Categories
(Remote Protocol :: Agent, enhancement, P3)
Tracking
(firefox141 fixed)
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: whimboo, Assigned: speneth1, Mentored)
Details
(Whiteboard: [lang=js][webdriver:m16][webdriver:external][webdriver:relnote] )
Attachments
(1 file)
Filed based on the discussion in the following Phabricator revision:
https://phabricator.services.mozilla.com/D199066#inline-1104049
To ease the checks for Marionette and WebDriver BiDi if on a given platform new windows are supported we should have a supportsWindows() method in the WindowManager module, which would be similar to TabManager.supportsTabs().
With that helper command added we could simplify the checks in Marionette (WebDriver:NewWindow command) and WebDriver BiDi (browsingContext.create command) to have something like:
let type;
if (typeHint == "tab" && supportsTabs() || typeHint == "window" && supportsWindows()) {
type = typeHint;
} else if (lazy.TabManager.supportsTabs()) {
type = "tab";
} else if (lazy.WindowManager.supportsWindows()) {
type = "window";
} else {
// throw appropriate error
}
| Reporter | ||
Updated•2 years ago
|
Hi, it's been some time, but may I take on this bug if it's still available?
| Reporter | ||
Comment 2•1 year ago
|
||
Yes, it's available given that no-one else commented on the bug recently and no patch is attached. So feel free to pick it up. Thanks!
- Added supportsWindows method to WindowManager.
- Refactored type selection in browsingContext.create to use an if/else block
that uses supportsTabs and supportsWindows to determine the type. - Removed the supportsTabs check from the "tab" case as the same check is now
performed in the type selection if/else block.
Updated•11 months ago
|
| Reporter | ||
Comment 4•11 months ago
|
||
Hi Spencer, I wanted to check back with you if you would have the time currently to update the reviewed patch. If it takes longer then no worries. Thanks.
Hi Henrik,
Apologies for the delay, life got busy and had to take a step back for a while. Starting from around this time next week I'll be able to sit back down and work on it. If that's no trouble despite the time, then I will take a look at it then.
Thanks,
-Spencer
Updated•8 months ago
|
Comment 7•8 months ago
|
||
| bugherder | ||
| Reporter | ||
Comment 8•8 months ago
|
||
Thank you Spencer for getting this feature added! Please let us know if you have interest to work on some other bug - or just find one yourself.
| Reporter | ||
Updated•7 months ago
|
Description
•