feat(launcher): add experimental "transport" option to pptr.connect (#3265)

This patch:
- adds experimental "transport" option to pptr.connect
- uses "transport" option to make sure Puppeteer-Web works with
  Target.exposeDevToolsProtocol

Drive-by: add `browser.target()` to access browser target.
This commit is contained in:
Andrey Lushnikov
2018-09-20 11:55:23 -07:00
committed by GitHub
parent 5acf953104
commit 4e48dfc7a1
7 changed files with 46 additions and 3 deletions

View File

@@ -48,6 +48,7 @@
* [browser.newPage()](#browsernewpage)
* [browser.pages()](#browserpages)
* [browser.process()](#browserprocess)
* [browser.target()](#browsertarget)
* [browser.targets()](#browsertargets)
* [browser.userAgent()](#browseruseragent)
* [browser.version()](#browserversion)
@@ -677,6 +678,11 @@ the method will return an array with all the pages in all browser contexts.
#### browser.process()
- returns: <?[ChildProcess]> Spawned browser process. Returns `null` if the browser instance was created with [`puppeteer.connect`](#puppeteerconnectoptions) method.
#### browser.target()
- returns: <[Target]>
A target associated with the browser.
#### browser.targets()
- returns: <[Array]<[Target]>>