Skip to content

Commit dbd16d3

Browse files
committed
addresses review feedback
1 parent cd25adb commit dbd16d3

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

files/en-us/web/webdriver/reference/bidi/modules/browser/createusercontext/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Set `params` to an empty object (`{}`) or include any of the following optional
2929
- `unhandledPromptBehavior` {{optional_inline}}
3030
- : An object that specifies the default behavior when a user prompt (such as an `alert`, `confirm`, or `prompt` dialog) is encountered within this user context. When set, it overrides the [session-level](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new#unhandledpromptbehavior) `unhandledPromptBehavior` setting for this user context.
3131

32+
> [!NOTE]
33+
> When a parameter is set, it applies to all existing and future tabs within this user context.
34+
3235
### Return value
3336

3437
The following field in the `result` object of the response describes the created user context:

files/en-us/web/webdriver/reference/bidi/modules/browser/index.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,31 @@ browser-compat: webdriver.bidi.browser
77
sidebar: webdriver
88
---
99

10-
The **`browser`** module contains commands for managing the browser, including user contexts, client windows, and download behavior.
10+
The **`browser`** module contains commands for managing the browser, including client windows, user contexts, and download behavior.
1111

12-
## User contexts
12+
## Client windows
1313

14-
A user context is a collection of zero or more top-level contexts (tabs) within the browser. Tabs within the same user context share the same browser storage (such as cookies and session data), while tabs in different user contexts are completely isolated from one another and do not share any browser data. A user context with no tabs is called an empty user context.
14+
A client window is an OS-level browser window, which includes the viewport (the area where web content is displayed) and browser UI elements such as the address bar and toolbars.
1515

16-
Each user context has a unique string identifier (user context ID). The browser always has a default user context with the ID `"default"`, which cannot be removed.
16+
Each client window has the following properties:
1717

18-
User contexts can be created using [`browser.createUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/createUserContext) and removed using [`browser.removeUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/removeUserContext).
18+
- A unique string identifier (`clientWindow`).
19+
- A state (`state`) indicating whether the window is normal, maximized, minimized, or fullscreen.
20+
- An active state (`active`) indicating whether the window can receive keyboard input from the operating system.
21+
- A position expressed as `x` and `y` coordinates in CSS pixels from the left and top edges of the screen, respectively.
22+
- A size expressed as `width` and `height` in CSS pixels.
1923

20-
## Client windows
24+
A list of client windows can be obtained using [`browser.getClientWindows`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/getClientWindows) and their state can be changed using [`browser.setClientWindowState`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/setClientWindowState).
2125

22-
A client window is a browser window, which includes the viewport (the area where web content is displayed) and browser UI elements such as the address bar and toolbars.
26+
## User contexts
2327

24-
Each client window has the following properties:
28+
A user context is a collection of zero or more top-level contexts (tabs) within the browser. Tabs within the same user context share the same browser storage (such as cookies and session data), while tabs in different user contexts are completely isolated from one another and do not share any browser data. A user context with no tabs is called an empty user context.
2529

26-
- A unique string identifier (client window ID)
27-
- A position expressed as `x` and `y` coordinates in CSS pixels from the left and top edges of the screen, respectively
28-
- A size expressed as `width` and `height` in CSS pixels
30+
Each user context has a unique string identifier (user context ID). The browser always has a default user context with the ID `"default"`, which cannot be removed.
2931

30-
Multiple tabs from different [user contexts](#user_contexts) can share the same client window.
32+
Multiple tabs from different user contexts can share the same [client window](#client_windows).
3133

32-
A list of client windows can be obtained using [`browser.getClientWindows`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/getClientWindows) and their state can be changed using [`browser.setClientWindowState`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/setClientWindowState).
34+
User contexts can be created using [`browser.createUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/createUserContext) and removed using [`browser.removeUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/removeUserContext).
3335

3436
## Commands
3537

files/en-us/web/webdriver/reference/bidi/modules/browser/removeusercontext/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ browser-compat: webdriver.bidi.browser.removeUserContext
77
sidebar: webdriver
88
---
99

10-
The `browser.removeUserContext` [command](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules#commands) of the [`browser`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser) module removes the specified [user context](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser#user_contexts) and all its tabs across all windows. Tabs are closed without running [`beforeunload`](/en-US/docs/Web/API/Window/beforeunload_event) event handler functions.
10+
The `browser.removeUserContext` [command](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules#commands) of the [`browser`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser) module removes the specified [user context](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser#user_contexts) and all its tabs across all windows. Tabs are closed without running the [`beforeunload`](/en-US/docs/Web/API/Window/beforeunload_event) event handler functions.
1111

1212
> [!WARNING]
1313
> This command is irreversible, and all storage associated with the user context is permanently deleted.

0 commit comments

Comments
 (0)