mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Support passing playwright browser options
This commit is contained in:
@@ -74,9 +74,10 @@ export function getBrowserType(): playwright.BrowserType<playwright.WebKitBrowse
|
||||
return browserType;
|
||||
}
|
||||
|
||||
export function launchBrowser(): Promise<playwright.Browser> {
|
||||
export function launchBrowser(opts?: playwright.LaunchOptions): Promise<playwright.Browser> {
|
||||
const browserType = getBrowserType();
|
||||
const options: Record<string, unknown> = {
|
||||
const options: playwright.LaunchOptions = {
|
||||
...opts,
|
||||
headless: process.argv.includes('--headless')
|
||||
};
|
||||
|
||||
|
||||
@@ -492,9 +492,10 @@ export function getBrowserType(): playwright.BrowserType<playwright.WebKitBrowse
|
||||
return browserType;
|
||||
}
|
||||
|
||||
export function launchBrowser(): Promise<playwright.Browser> {
|
||||
export function launchBrowser(opts?: playwright.LaunchOptions): Promise<playwright.Browser> {
|
||||
const browserType = getBrowserType();
|
||||
const options: Record<string, unknown> = {
|
||||
const options: playwright.LaunchOptions = {
|
||||
...opts,
|
||||
headless: process.argv.includes('--headless')
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user