Interface: BrowserManager
Defined in: browser/manager.ts:18
The browser's single persistent context, opened on first use (ADR-002).
Methods
chromiumDownload()
chromiumDownload(): "downloading" | "failed" | undefined;
Defined in: browser/manager.ts:27
Whether Chromium is being downloaded, or the last download failed (ADR-001).
Returns
"downloading" | "failed" | undefined
close()
close(): Promise<void>;
Defined in: browser/manager.ts:41
Returns
Promise<void>
context()
context(options?): Promise<BrowserContext>;
Defined in: browser/manager.ts:23
The open context, launching it if needed. A headed request relaunches a headless context with a window; a headless request reuses a headed one rather than closing a window the person may be using.
Parameters
| Parameter | Type |
|---|---|
options? | ContextOptions |
Returns
Promise<BrowserContext>
openChannel()
openChannel(): "chromium" | "msedge" | "chrome" | undefined;
Defined in: browser/manager.ts:25
The channel of the open context, or undefined while none is open.
Returns
"chromium" | "msedge" | "chrome" | undefined
saveSession()
saveSession(): Promise<void>;
Defined in: browser/manager.ts:40
Saves the session cookies of the open context, if any (ADR-003).
Returns
Promise<void>
setVisible()
setVisible(visible): Promise<void>;
Defined in: browser/manager.ts:34
Shows the browser (relaunching it with a window now, session kept) and follows the pages functions open in it, or hides it (closing the window; the next call runs headless). ADR-007.
Parameters
| Parameter | Type |
|---|---|
visible | boolean |
Returns
Promise<void>
show()
show(url): Promise<void>;
Defined in: browser/manager.ts:36
While following, brings url (a site page) to the front of the window; best effort, never throws.
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Promise<void>
tab()
tab(): Promise<Page>;
Defined in: browser/manager.ts:38
The one working tab a program drives itself (ADR-007), the same one following shows; opens the browser if needed.
Returns
Promise<Page>
visible()
visible(): boolean;
Defined in: browser/manager.ts:29
Whether the browser shows a window now: what setVisible asked for, else the options.
Returns
boolean