mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
committed by
Andrey Lushnikov
parent
d4c5aee5a8
commit
615381c70e
@@ -84,8 +84,8 @@ class Browser {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Promise<!Page>}
|
||||
*/
|
||||
* @return {!Promise<!Page>}
|
||||
*/
|
||||
async newPage() {
|
||||
await this._ensureChromeIsRunning();
|
||||
if (!this._chromeProcess || this._terminated)
|
||||
@@ -96,17 +96,8 @@ class Browser {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!Page} page
|
||||
*/
|
||||
async closePage(page) {
|
||||
if (!this._chromeProcess || this._terminated)
|
||||
throw new Error('ERROR: this chrome instance is not running');
|
||||
await page.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
* @return {string}
|
||||
*/
|
||||
async version() {
|
||||
await this._ensureChromeIsRunning();
|
||||
let version = await Connection.version(this._remoteDebuggingPort);
|
||||
|
||||
Reference in New Issue
Block a user