Skip to content

Commit 2bc8ed0

Browse files
authored
docs(context): document the browser() call from persistent context (#36216)
1 parent a0eb891 commit 2bc8ed0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/src/api/class-browsercontext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ All existing background pages in the context.
467467
* since: v1.8
468468
- returns: <[null]|[Browser]>
469469

470-
Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
470+
Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal browser, e.g. Android or Electron.
471471

472472
## async method: BrowserContext.clearCookies
473473
* since: v1.8

packages/playwright-client/types/types.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8840,7 +8840,8 @@ export interface BrowserContext {
88408840
backgroundPages(): Array<Page>;
88418841

88428842
/**
8843-
* Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
8843+
* Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal
8844+
* browser, e.g. Android or Electron.
88448845
*/
88458846
browser(): null|Browser;
88468847

packages/playwright-core/types/types.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8840,7 +8840,8 @@ export interface BrowserContext {
88408840
backgroundPages(): Array<Page>;
88418841

88428842
/**
8843-
* Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
8843+
* Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal
8844+
* browser, e.g. Android or Electron.
88448845
*/
88458846
browser(): null|Browser;
88468847

0 commit comments

Comments
 (0)