Remove browser.closePage. (#124)

Remove browser.closePage. Closes #116
This commit is contained in:
JoelEinbinder 2017-07-25 00:44:13 -07:00 committed by Andrey Lushnikov
parent d4c5aee5a8
commit 615381c70e
2 changed files with 4 additions and 20 deletions

View File

@ -9,7 +9,6 @@
* [class: Browser](#class-browser) * [class: Browser](#class-browser)
+ [new Browser([options])](#new-browseroptions) + [new Browser([options])](#new-browseroptions)
+ [browser.close()](#browserclose) + [browser.close()](#browserclose)
+ [browser.closePage(page)](#browserclosepagepage)
+ [browser.newPage()](#browsernewpage) + [browser.newPage()](#browsernewpage)
+ [browser.stderr](#browserstderr) + [browser.stderr](#browserstderr)
+ [browser.stdout](#browserstdout) + [browser.stdout](#browserstdout)
@ -197,12 +196,6 @@ browser.newPage().then(async page => {
Closes browser with all the pages (if any were opened). The browser object itself is considered to be disposed and could not be used anymore. Closes browser with all the pages (if any were opened). The browser object itself is considered to be disposed and could not be used anymore.
#### browser.closePage(page)
- `page` <[Page]> A page to be closed.
- returns: <[Promise]> Promise which resolves when the page is closed.
This is an alias for the `page.close()` method.
#### browser.newPage() #### browser.newPage()
- returns: <[Promise]<[Page]>> Promise which resolves to a new [Page] object. - returns: <[Promise]<[Page]>> Promise which resolves to a new [Page] object.

View File

@ -95,15 +95,6 @@ class Browser {
return page; return page;
} }
/**
* @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}
*/ */