mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Move to playwright-core, download browser if needed
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import * as playwright from 'playwright';
|
||||
import * as playwright from 'playwright-core';
|
||||
import deepEqual = require('deep-equal');
|
||||
import { ITerminalOptions } from 'xterm';
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function openTerminal(page: playwright.Page, options: ITerminalOpti
|
||||
}
|
||||
}
|
||||
|
||||
export function getBrowserType(): playwright.BrowserType {
|
||||
export async function getBrowserType(): Promise<playwright.BrowserType> {
|
||||
// Default to chromium
|
||||
let browserType: playwright.BrowserType = playwright['chromium'];
|
||||
|
||||
@@ -53,5 +53,7 @@ export function getBrowserType(): playwright.BrowserType {
|
||||
}
|
||||
}
|
||||
|
||||
await browserType.downloadBrowserIfNeeded();
|
||||
|
||||
return browserType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user