Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: puppeteer/puppeteer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.0
Choose a base ref
...
head repository: puppeteer/puppeteer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.0
Choose a head ref

Commits on Jul 2, 2020

  1. Copy the full SHA
    928924e View commit details
  2. Copy the full SHA
    054fa2e View commit details

Commits on Jul 3, 2020

  1. fix: make Node.js environment detection robust w.r.t. JSDOM (#6148)

    Previously Node.js was detected by the lack of `global.document` which doesn’t work in case JSDOM is being used in Node.js. Instead, we now detect `process.versions.node`, like here: https://github.com/MatthewSH/is-node/commit/426943ae936536f9c2fd10fd58a9a46b59470097#diff-168726dbe96b3ce427e7fedce31bb0bc.
    
    Fixes #6147.
    wojtekmaj authored Jul 3, 2020
    Copy the full SHA
    aee8fda View commit details
  2. Copy the full SHA
    d9bb52e View commit details
  3. docs: migrating Page.ts to TSDoc (#6152)

    * docs: a small batch of page TSdoc migration
    
    Co-authored-by: Changhao Han <changhaohan@chromium.org>
    hanselfmu and hanselfmu-chromium authored Jul 3, 2020
    Copy the full SHA
    4ebf117 View commit details
  4. chore(docs): document HTTPRequest with TSDoc (#6146)

    * chore(docs): document HTTPRequest with TSDoc
    
    * doclint
    
    * example
    jackfranklin authored Jul 3, 2020
    Copy the full SHA
    f7857d2 View commit details
  5. feat(types): add types for page.$$eval (#6139)

    * feat(types): add types for `page.$$eval`
    
    * Add new-docs for $$eval
    
    * fix example
    
    * linting
    jackfranklin authored Jul 3, 2020
    Copy the full SHA
    5049b83 View commit details

Commits on Jul 6, 2020

  1. Copy the full SHA
    e67a860 View commit details
  2. chore(docs): migrate & document all Page events (#6154)

    * chore(docs): migrate & document all Page events
    
    Rather than a generic `Events.ts` file we can instead document events as
    an enum within each individual class. It's easier to document and work
    with, and it's clearer where events originate from.
    jackfranklin authored Jul 6, 2020
    Copy the full SHA
    ba7624a View commit details
  3. Copy the full SHA
    782c1d4 View commit details
  4. chore(docs): fix DOMWorld doc warnings (#6166)

    I noticed that DOMWorld was spitting a lot of warnings out when we
    generated the docs. It was mostly easy tidy-ups and removing old JSDoc
    comments and now the warnings are gone :)
    jackfranklin authored Jul 6, 2020
    Copy the full SHA
    e2e0502 View commit details

Commits on Jul 7, 2020

  1. Copy the full SHA
    2256b8d View commit details
  2. Copy the full SHA
    022495b View commit details
  3. chore: migrate NetworkManager events (#6174)

    This is part of the effort to remove `Events.ts` in favour of defining
    events next to the class that emits them. In this case these events are
    internal, so there's no docs changes, but it's still worth doing such
    that we can remove the Events.ts file in the long term once all the
    different events are migrated.
    jackfranklin authored Jul 7, 2020
    Copy the full SHA
    12ee70f View commit details

Commits on Jul 8, 2020

  1. chore(docs): fix incorrect @returns on getter (#6175)

    On a getter function you don't use `@returns` (as that's just for
    methods). Instead we can just add to the general remarks to explain what
    the property is providing.
    jackfranklin authored Jul 8, 2020
    Copy the full SHA
    6ee7139 View commit details
  2. Copy the full SHA
    74cb2ce View commit details
  3. Copy the full SHA
    0e93880 View commit details
  4. chore: forbid importing src/common/Events.ts (#6183)

    This file is now deprecated and only used by the coverage tool and
    DocLint - these tools will be updated to not rely on it in the future.
    
    We now have events defined per class - e.g. all the events that `Page`
    can emit are defined in the `PageEmittedEvents` enum, and similar. We
    have to keep `Events.ts` around for the aforementioned tools, but don't
    want its usage creeping back into our source code.
    jackfranklin authored Jul 8, 2020
    Copy the full SHA
    19f188a View commit details

Commits on Jul 9, 2020

  1. chore: remove installAsyncStackHooks helper (#6186)

    * chore: remove `installAsyncStackHooks` helper
    
    This code was written when browsers/Node didn't support errors in async
    functions very well. They now do a much better job of this, so we can
    lose the additonal complexity from our codebase and leave it to the host
    environment :)
    
    * lazy launcher is private
    
    * remove async stack test
    jackfranklin authored Jul 9, 2020
    Copy the full SHA
    1243466 View commit details
  2. Copy the full SHA
    b9667f9 View commit details
  3. chore(docs): document Frame class (#6188)

    * chore: document Frame class
    jackfranklin authored Jul 9, 2020
    Copy the full SHA
    24cb6a2 View commit details
  4. chore(docs): tidy Puppeteer class docs (#6181)

    * Mark properties as `private` or `@internal` so they don't get
      documented.
    * Fix the `@returns` on a getter which gets ignored.
    jackfranklin authored Jul 9, 2020
    Copy the full SHA
    03a87e8 View commit details

Commits on Jul 10, 2020

  1. chore: remove src/api.ts (#6191)

    Now the async hooks helper is gone api.ts was only used by the coverage
    tools and by doclint.
    
    DocLint is nearing the end of its lifespan with the TSDoc work, so I
    focused on how best to define a list of modules for the coverage
    tooling. They define an object of classes, and the path to that module.
    They need the full path because we also check if the module exports any
    events that need to be emitted - the coverage tool asserts that the
    emitting of those events is also tested.
    
    It's not _great_ that DocLint relies on a constant defined in the
    coverage utils, but it should only be this way for a short period of
    time and no one is actively working on DocLint (bar the effort to remove
    it) so I don't think this is worth worrying about.
    
    This change also broke the DocLint tests; based on the fact that DocLint is on its way out it doesn't feel worth fixing the tests, so this commit also removes them.
    jackfranklin authored Jul 10, 2020
    Copy the full SHA
    f666be3 View commit details
  2. chore: use devtools-protocol package (#6172)

    * chore: Use devtools-protocol package
    
    Rather than maintain our own protocol we can instead use the devtools-protocol package and pin it to the version of Chromium that Puppeteer is shipping with.
    
    The only changes are naming changes between the bespoke protocol that Puppeteer created and the devtools-protocol one.
    jackfranklin authored Jul 10, 2020
    Copy the full SHA
    31309b0 View commit details
  3. Copy the full SHA
    9b3005c View commit details
  4. feat(chromium): roll Chromium to r768783 (#6201)

    * feat(chromium): roll Chromium to r768783
    
    * fix: update unit test for crrev:2135046
    
    * chore: update devtools-protocol revision
    
    Co-authored-by: Changhao Han <changhaohan@chromium.org>
    hanselfmu and hanselfmu-chromium authored Jul 10, 2020
    Copy the full SHA
    790c277 View commit details

Commits on Jul 13, 2020

  1. chore: mark version v5.1.0 (#6206)

    Co-authored-by: Changhao Han <changhaohan@chromium.org>
    hanselfmu and hanselfmu-chromium authored Jul 13, 2020
    Copy the full SHA
    8fa18ae View commit details
Showing with 3,314 additions and 18,403 deletions.
  1. +0 −2 .eslintignore
  2. +5 −1 .eslintrc.js
  3. +1 −2 .travis.yml
  4. +11 −11 README.md
  5. +28 −4 docs/api.md
  6. +14 −1 docs/troubleshooting.md
  7. +2 −0 new-docs/puppeteer.browser.md
  8. +2 −0 new-docs/puppeteer.browsercontext.md
  9. +20 −0 new-docs/puppeteer.browsercontextemittedevents.md
  10. +23 −0 new-docs/puppeteer.browseremittedevents.md
  11. +1 −1 new-docs/puppeteer.cdpsession.md
  12. +3 −3 new-docs/puppeteer.cdpsession.send.md
  13. +0 −11 new-docs/puppeteer.connection._callbacks.md
  14. +0 −11 new-docs/puppeteer.connection._closed.md
  15. +0 −22 new-docs/puppeteer.connection._constructor_.md
  16. +0 −11 new-docs/puppeteer.connection._delay.md
  17. +0 −11 new-docs/puppeteer.connection._lastid.md
  18. +0 −15 new-docs/puppeteer.connection._onclose.md
  19. +0 −22 new-docs/puppeteer.connection._onmessage.md
  20. +0 −22 new-docs/puppeteer.connection._rawsend.md
  21. +0 −11 new-docs/puppeteer.connection._sessions.md
  22. +0 −11 new-docs/puppeteer.connection._transport.md
  23. +0 −11 new-docs/puppeteer.connection._url.md
  24. +0 −24 new-docs/puppeteer.connection.createsession.md
  25. +0 −15 new-docs/puppeteer.connection.dispose.md
  26. +0 −22 new-docs/puppeteer.connection.fromsession.md
  27. +0 −45 new-docs/puppeteer.connection.md
  28. +0 −23 new-docs/puppeteer.connection.send.md
  29. +0 −24 new-docs/puppeteer.connection.session.md
  30. +0 −15 new-docs/puppeteer.connection.url.md
  31. +11 −0 new-docs/puppeteer.continuerequestoverrides.headers.md
  32. +22 −0 new-docs/puppeteer.continuerequestoverrides.md
  33. +11 −0 new-docs/puppeteer.continuerequestoverrides.method.md
  34. +11 −0 new-docs/puppeteer.continuerequestoverrides.postdata.md
  35. +13 −0 new-docs/puppeteer.continuerequestoverrides.url.md
  36. +20 −0 new-docs/puppeteer.credentials.md
  37. +11 −0 new-docs/puppeteer.credentials.password.md
  38. +11 −0 new-docs/puppeteer.credentials.username.md
  39. +3 −3 new-docs/puppeteer.elementhandle.__eval.md
  40. +12 −0 new-docs/puppeteer.errorcode.md
  41. +1 −1 new-docs/puppeteer.evaluatefn.md
  42. +1 −1 new-docs/puppeteer.evaluatefnreturntype.md
  43. +5 −1 new-docs/puppeteer.frame._.md
  44. +5 −1 new-docs/puppeteer.frame.__.md
  45. +19 −5 new-docs/puppeteer.frame.__eval.md
  46. +0 −11 new-docs/puppeteer.frame._childframes.md
  47. +0 −11 new-docs/puppeteer.frame._client.md
  48. +0 −23 new-docs/puppeteer.frame._constructor_.md
  49. +0 −15 new-docs/puppeteer.frame._detach.md
  50. +0 −11 new-docs/puppeteer.frame._detached.md
  51. +17 −3 new-docs/puppeteer.frame._eval.md
  52. +0 −11 new-docs/puppeteer.frame._framemanager.md
  53. +0 −11 new-docs/puppeteer.frame._id.md
  54. +0 −11 new-docs/puppeteer.frame._lifecycleevents.md
  55. +0 −11 new-docs/puppeteer.frame._loaderid.md
  56. +0 −11 new-docs/puppeteer.frame._mainworld.md
  57. +0 −11 new-docs/puppeteer.frame._name.md
  58. +0 −22 new-docs/puppeteer.frame._navigated.md
  59. +0 −22 new-docs/puppeteer.frame._navigatedwithindocument.md
  60. +0 −23 new-docs/puppeteer.frame._onlifecycleevent.md
  61. +0 −15 new-docs/puppeteer.frame._onloadingstopped.md
  62. +0 −11 new-docs/puppeteer.frame._parentframe.md
  63. +0 −11 new-docs/puppeteer.frame._secondaryworld.md
  64. +0 −11 new-docs/puppeteer.frame._url.md
  65. +3 −1 new-docs/puppeteer.frame._x.md
  66. +6 −7 new-docs/puppeteer.frame.addscripttag.md
  67. +6 −6 new-docs/puppeteer.frame.addstyletag.md
  68. +2 −0 new-docs/puppeteer.frame.childframes.md
  69. +17 −1 new-docs/puppeteer.frame.click.md
  70. +2 −0 new-docs/puppeteer.frame.content.md
  71. +8 −4 new-docs/puppeteer.frame.evaluate.md
  72. +8 −2 new-docs/puppeteer.frame.evaluatehandle.md
  73. +2 −0 new-docs/puppeteer.frame.executioncontext.md
  74. +7 −1 new-docs/puppeteer.frame.focus.md
  75. +22 −2 new-docs/puppeteer.frame.goto.md
  76. +7 −1 new-docs/puppeteer.frame.hover.md
  77. +2 −0 new-docs/puppeteer.frame.isdetached.md
  78. +59 −38 new-docs/puppeteer.frame.md
  79. +8 −0 new-docs/puppeteer.frame.name.md
  80. +2 −0 new-docs/puppeteer.frame.parentframe.md
  81. +19 −2 new-docs/puppeteer.frame.select.md
  82. +4 −2 new-docs/puppeteer.frame.setcontent.md
  83. +9 −1 new-docs/puppeteer.frame.tap.md
  84. +2 −0 new-docs/puppeteer.frame.title.md
  85. +20 −3 new-docs/puppeteer.frame.type.md
  86. +2 −0 new-docs/puppeteer.frame.url.md
  87. +11 −3 new-docs/puppeteer.frame.waitfor.md
  88. +38 −7 new-docs/puppeteer.frame.waitforfunction.md
  89. +18 −1 new-docs/puppeteer.frame.waitfornavigation.md
  90. +32 −2 new-docs/puppeteer.frame.waitforselector.md
  91. +8 −2 new-docs/puppeteer.frame.waitforxpath.md
  92. +13 −0 new-docs/puppeteer.frameaddscripttagoptions.content.md
  93. +22 −0 new-docs/puppeteer.frameaddscripttagoptions.md
  94. +18 −0 new-docs/puppeteer.frameaddscripttagoptions.path.md
  95. +13 −0 new-docs/puppeteer.frameaddscripttagoptions.type.md
  96. +13 −0 new-docs/puppeteer.frameaddscripttagoptions.url.md
  97. +13 −0 new-docs/puppeteer.frameaddstyletagoptions.content.md
  98. +21 −0 new-docs/puppeteer.frameaddstyletagoptions.md
  99. +18 −0 new-docs/puppeteer.frameaddstyletagoptions.path.md
  100. +13 −0 new-docs/puppeteer.frameaddstyletagoptions.url.md
  101. +0 −11 new-docs/puppeteer.framemanager._client.md
  102. +0 −23 new-docs/puppeteer.framemanager._constructor_.md
  103. +0 −11 new-docs/puppeteer.framemanager._contextidtocontext.md
  104. +0 −22 new-docs/puppeteer.framemanager._ensureisolatedworld.md
  105. +0 −11 new-docs/puppeteer.framemanager._frames.md
  106. +0 −22 new-docs/puppeteer.framemanager._handleframetree.md
  107. +0 −11 new-docs/puppeteer.framemanager._isolatedworlds.md
  108. +0 −11 new-docs/puppeteer.framemanager._mainframe.md
  109. +0 −11 new-docs/puppeteer.framemanager._networkmanager.md
  110. +0 −22 new-docs/puppeteer.framemanager._onexecutioncontextcreated.md
  111. +0 −22 new-docs/puppeteer.framemanager._onexecutioncontextdestroyed.md
  112. +0 −15 new-docs/puppeteer.framemanager._onexecutioncontextscleared.md
  113. +0 −23 new-docs/puppeteer.framemanager._onframeattached.md
  114. +0 −22 new-docs/puppeteer.framemanager._onframedetached.md
  115. +0 −22 new-docs/puppeteer.framemanager._onframenavigated.md
  116. +0 −23 new-docs/puppeteer.framemanager._onframenavigatedwithindocument.md
  117. +0 −22 new-docs/puppeteer.framemanager._onframestoppedloading.md
  118. +0 −22 new-docs/puppeteer.framemanager._onlifecycleevent.md
  119. +0 −11 new-docs/puppeteer.framemanager._page.md
  120. +0 −22 new-docs/puppeteer.framemanager._removeframesrecursively.md
  121. +0 −11 new-docs/puppeteer.framemanager._timeoutsettings.md
  122. +0 −22 new-docs/puppeteer.framemanager.executioncontextbyid.md
  123. +0 −22 new-docs/puppeteer.framemanager.frame.md
  124. +0 −15 new-docs/puppeteer.framemanager.frames.md
  125. +0 −15 new-docs/puppeteer.framemanager.initialize.md
  126. +0 −15 new-docs/puppeteer.framemanager.mainframe.md
  127. +0 −58 new-docs/puppeteer.framemanager.md
  128. +0 −28 new-docs/puppeteer.framemanager.navigateframe.md
  129. +0 −15 new-docs/puppeteer.framemanager.networkmanager.md
  130. +0 −15 new-docs/puppeteer.framemanager.page.md
  131. +0 −26 new-docs/puppeteer.framemanager.waitforframenavigation.md
  132. +20 −0 new-docs/puppeteer.framewaitforfunctionoptions.md
  133. +17 −0 new-docs/puppeteer.framewaitforfunctionoptions.polling.md
  134. +13 −0 new-docs/puppeteer.framewaitforfunctionoptions.timeout.md
  135. +0 −25 new-docs/puppeteer.httprequest._constructor_.md
  136. +0 −11 new-docs/puppeteer.httprequest._failuretext.md
  137. +0 −11 new-docs/puppeteer.httprequest._frommemorycache.md
  138. +0 −11 new-docs/puppeteer.httprequest._interceptionid.md
  139. +0 −11 new-docs/puppeteer.httprequest._redirectchain.md
  140. +0 −11 new-docs/puppeteer.httprequest._requestid.md
  141. +0 −11 new-docs/puppeteer.httprequest._response.md
  142. +7 −1 new-docs/puppeteer.httprequest.abort.md
  143. +26 −7 new-docs/puppeteer.httprequest.continue.md
  144. +17 −1 new-docs/puppeteer.httprequest.failure.md
  145. +2 −0 new-docs/puppeteer.httprequest.frame.md
  146. +2 −0 new-docs/puppeteer.httprequest.headers.md
  147. +2 −0 new-docs/puppeteer.httprequest.isnavigationrequest.md
  148. +23 −18 new-docs/puppeteer.httprequest.md
  149. +2 −0 new-docs/puppeteer.httprequest.method.md
  150. +2 −0 new-docs/puppeteer.httprequest.postdata.md
  151. +24 −0 new-docs/puppeteer.httprequest.redirectchain.md
  152. +7 −0 new-docs/puppeteer.httprequest.resourcetype.md
  153. +27 −7 new-docs/puppeteer.httprequest.respond.md
  154. +2 −0 new-docs/puppeteer.httprequest.response.md
  155. +2 −0 new-docs/puppeteer.httprequest.url.md
  156. +2 −2 new-docs/puppeteer.jshandle.evaluate.md
  157. +17 −6 new-docs/puppeteer.md
  158. +1 −0 new-docs/puppeteer.mouse.md
  159. +42 −0 new-docs/puppeteer.mouse.wheel.md
  160. +11 −0 new-docs/puppeteer.mousewheeloptions.deltax.md
  161. +11 −0 new-docs/puppeteer.mousewheeloptions.deltay.md
  162. +20 −0 new-docs/puppeteer.mousewheeloptions.md
  163. +53 −5 new-docs/puppeteer.page.__eval.md
  164. +1 −1 new-docs/puppeteer.page.authenticate.md
  165. +2 −0 new-docs/puppeteer.page.cookies.md
  166. +2 −2 new-docs/puppeteer.page.deletecookie.md
  167. +49 −4 new-docs/puppeteer.page.evaluate.md
  168. +5 −3 new-docs/puppeteer.page.md
  169. +17 −0 new-docs/puppeteer.pageemittedevents.md
  170. +0 −11 new-docs/puppeteer.puppeteer.__productname.md
  171. +0 −11 new-docs/puppeteer.puppeteer._changedproduct.md
  172. +0 −11 new-docs/puppeteer.puppeteer._ispuppeteercore.md
  173. +0 −11 new-docs/puppeteer.puppeteer._lazylauncher.md
  174. +0 −11 new-docs/puppeteer.puppeteer._preferredrevision.md
  175. +1 −0 new-docs/puppeteer.puppeteer.devices.md
  176. +1 −1 new-docs/puppeteer.puppeteer.errors.md
  177. +4 −7 new-docs/puppeteer.puppeteer.md
  178. +2 −0 new-docs/puppeteer.puppeteer.product.md
  179. +11 −0 new-docs/puppeteer.puppeteerlifecycleevent.md
  180. +11 −0 new-docs/puppeteer.responseforrequest.body.md
  181. +11 −0 new-docs/puppeteer.responseforrequest.contenttype.md
  182. +11 −0 new-docs/puppeteer.responseforrequest.headers.md
  183. +23 −0 new-docs/puppeteer.responseforrequest.md
  184. +11 −0 new-docs/puppeteer.responseforrequest.status.md
  185. +1 −1 new-docs/puppeteer.serializable.md
  186. +11 −0 new-docs/puppeteer.unwrappromiselike.md
  187. +1 −1 new-docs/puppeteer.waitforoptions.md
  188. +11 −0 new-docs/puppeteer.waitforselectoroptions.hidden.md
  189. +21 −0 new-docs/puppeteer.waitforselectoroptions.md
  190. +11 −0 new-docs/puppeteer.waitforselectoroptions.timeout.md
  191. +11 −0 new-docs/puppeteer.waitforselectoroptions.visible.md
  192. +7 −8 package.json
  193. +83 −0 scripts/ensure-correct-devtools-protocol-package.ts
  194. +4 −0 src/api-docs-entry.ts
  195. +0 −51 src/api.ts
  196. +1 −1 src/common/Accessibility.ts
  197. +104 −23 src/common/Browser.ts
  198. +41 −10 src/common/Connection.ts
  199. +7 −9 src/common/Coverage.ts
  200. +34 −46 src/common/DOMWorld.ts
  201. +1 −1 src/common/Dialog.ts
  202. +1 −1 src/common/EmulationManager.ts
  203. +8 −2 src/common/EvalTypes.ts
  204. +13 −0 src/common/Events.ts
  205. +2 −2 src/common/ExecutionContext.ts
  206. +2 −2 src/common/FileChooser.ts
  207. +625 −56 src/common/FrameManager.ts
  208. +228 −19 src/common/HTTPRequest.ts
  209. +1 −1 src/common/HTTPResponse.ts
  210. +40 −0 src/common/Input.ts
  211. +30 −20 src/common/JSHandle.ts
  212. +11 −7 src/common/LifecycleWatcher.ts
  213. +35 −20 src/common/NetworkManager.ts
  214. +309 −70 src/common/Page.ts
  215. +17 −9 src/common/Puppeteer.ts
  216. +1 −1 src/common/SecurityDetails.ts
  217. +4 −5 src/common/Target.ts
  218. +3 −3 src/common/TimeoutSettings.ts
  219. +2 −2 src/common/WebWorker.ts
  220. +1 −39 src/common/helper.ts
  221. +5 −1 src/environment.ts
  222. +1 −18 src/initialize.ts
  223. +0 −15,503 src/protocol.d.ts
  224. +1 −1 src/revisions.ts
  225. +43 −0 test/assets/input/wheel.html
  226. +4 −1 test/browsercontext.spec.ts
  227. +7 −5 test/cookies.spec.ts
  228. +50 −12 test/coverage-utils.js
  229. +1 −1 test/coverage.spec.ts
  230. +18 −7 test/elementhandle.spec.ts
  231. +1 −1 test/emulation.spec.ts
  232. +14 −7 test/evaluation.spec.ts
  233. +2 −2 test/frame.spec.ts
  234. +8 −8 test/input.spec.ts
  235. +14 −4 test/jshandle.spec.ts
  236. +9 −1 test/keyboard.spec.ts
  237. +5 −0 test/launcher.spec.ts
  238. +32 −5 test/mouse.spec.ts
  239. +2 −2 test/navigation.spec.ts
  240. +7 −21 test/page.spec.ts
  241. +12 −6 test/queryselector.spec.ts
  242. +1 −1 test/requestinterception.spec.ts
  243. +4 −1 test/screenshot.spec.ts
  244. +2 −2 test/target.spec.ts
  245. +20 −8 test/waittask.spec.ts
  246. +4 −1 test/worker.spec.ts
  247. +4 −0 utils/apply_next_version.js
  248. +2 −1 utils/check_availability.js
  249. +13 −3 utils/doclint/check_public_api/JSBuilder.js
  250. +81 −17 utils/doclint/check_public_api/index.js
  251. +0 −2 utils/doclint/check_public_api/test/.gitignore
  252. +0 −15 utils/doclint/check_public_api/test/check-duplicates/doc.md
  253. +0 −13 utils/doclint/check_public_api/test/check-duplicates/foo.js
  254. +0 −3 utils/doclint/check_public_api/test/check-duplicates/result.txt
  255. +0 −14 utils/doclint/check_public_api/test/check-returns/doc.md
  256. +0 −20 utils/doclint/check_public_api/test/check-returns/foo.js
  257. +0 −4 utils/doclint/check_public_api/test/check-returns/result.txt
  258. +0 −8 utils/doclint/check_public_api/test/check-sorting/Events.js
  259. +0 −15 utils/doclint/check_public_api/test/check-sorting/doc.md
  260. +0 −12 utils/doclint/check_public_api/test/check-sorting/foo.js
  261. +0 −4 utils/doclint/check_public_api/test/check-sorting/result.txt
  262. +0 −14 utils/doclint/check_public_api/test/diff-arguments/doc.md
  263. +0 −19 utils/doclint/check_public_api/test/diff-arguments/foo.js
  264. +0 −4 utils/doclint/check_public_api/test/diff-arguments/result.txt
  265. +0 −5 utils/doclint/check_public_api/test/diff-classes/doc.md
  266. +0 −2 utils/doclint/check_public_api/test/diff-classes/foo.js
  267. +0 −2 utils/doclint/check_public_api/test/diff-classes/other.js
  268. +0 −3 utils/doclint/check_public_api/test/diff-classes/result.txt
  269. +0 −8 utils/doclint/check_public_api/test/diff-events/Events.js
  270. +0 −5 utils/doclint/check_public_api/test/diff-events/doc.md
  271. +0 −3 utils/doclint/check_public_api/test/diff-events/foo.js
  272. +0 −2 utils/doclint/check_public_api/test/diff-events/result.txt
  273. +0 −10 utils/doclint/check_public_api/test/diff-methods/doc.md
  274. +0 −16 utils/doclint/check_public_api/test/diff-methods/foo.js
  275. +0 −3 utils/doclint/check_public_api/test/diff-methods/result.txt
  276. +0 −5 utils/doclint/check_public_api/test/diff-properties/doc.md
  277. +0 −7 utils/doclint/check_public_api/test/diff-properties/foo.js
  278. +0 −2 utils/doclint/check_public_api/test/diff-properties/result.txt
  279. +0 −6 utils/doclint/check_public_api/test/js-builder-common/Events.js
  280. +0 −13 utils/doclint/check_public_api/test/js-builder-common/foo.js
  281. +0 −50 utils/doclint/check_public_api/test/js-builder-common/result.txt
  282. +0 −8 utils/doclint/check_public_api/test/js-builder-inheritance/Events.js
  283. +0 −15 utils/doclint/check_public_api/test/js-builder-inheritance/foo.js
  284. +0 −61 utils/doclint/check_public_api/test/js-builder-inheritance/result.txt
  285. +0 −24 utils/doclint/check_public_api/test/md-builder-common/doc.md
  286. +0 −39 utils/doclint/check_public_api/test/md-builder-common/result.txt
  287. +0 −125 utils/doclint/check_public_api/test/public-api.spec.js
  288. +0 −276 utils/protocol-types-generator/index.js
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ node6/*
node6-test/*
experimental/
lib/
src/externs.d.ts
src/protocol.d.ts
/index.d.ts
# We ignore this file because it uses ES imports which we don't yet use
# in the Puppeteer src, so it trips up the ESLint-TypeScript parser.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -84,7 +84,11 @@ module.exports = {
"mocha/no-exclusive-tests": "error",

// enforce the variable in a catch block is named error
"unicorn/catch-error-name": "error"
"unicorn/catch-error-name": "error",

"no-restricted-imports": ["error", {
patterns: ["*Events"],
}]
},
"overrides": [
{
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -63,10 +63,9 @@ jobs:
env:
- CHROMIUM=true
script:
- npm run compare-protocol-d-ts
- npm run lint
- npm run test-doclint
- npm run ensure-new-docs-up-to-date
- npm run ensure-correct-devtools-protocol-revision

# This bot runs separately as it changes package.json to test puppeteer-core
# and we don't want that leaking into other bots and causing issues.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right">

###### [API](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md) | [Troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)
###### [API](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md) | [FAQ](#faq) | [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING.md) | [Troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)

> Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium.
@@ -37,7 +37,7 @@ npm i puppeteer
# or "yarn add puppeteer"
```

Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, or to download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#environment-variables).
Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, or to download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#environment-variables).


### puppeteer-core
@@ -63,7 +63,7 @@ Note: Prior to v1.18.1, Puppeteer required at least Node v6.4.0. Versions from v
Node 8.9.0+. Starting from v3.0.0 Puppeteer starts to rely on Node 10.18.1+. All examples below use async/await which is only supported in Node v7.6.0 or greater.

Puppeteer will be familiar to people using other browser testing frameworks. You create an instance
of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#).
of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#).

**Example** - navigating to https://example.com and saving a screenshot as *example.png*:

@@ -88,7 +88,7 @@ Execute script on the command line
node example.js
```

Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#pagesetviewportviewport).
Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#pagesetviewportviewport).

**Example** - create a PDF.

@@ -113,7 +113,7 @@ Execute script on the command line
node hn.js
```

See [`Page.pdf()`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#pagepdfoptions) for more information about creating pdfs.
See [`Page.pdf()`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#pagepdfoptions) for more information about creating pdfs.

**Example** - evaluate script in the context of the page

@@ -148,7 +148,7 @@ Execute script on the command line
node get-dimensions.js
```

See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#pageevaluatepagefunction-args) for more information on `evaluate` and related methods like `evaluateOnNewDocument` and `exposeFunction`.
See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#pageevaluatepagefunction-args) for more information on `evaluate` and related methods like `evaluateOnNewDocument` and `exposeFunction`.

<!-- [END getstarted] -->

@@ -157,7 +157,7 @@ See [`Page.evaluate()`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/

**1. Uses Headless mode**

Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#puppeteerlaunchoptions) when launching a browser:
Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#puppeteerlaunchoptions) when launching a browser:

```js
const browser = await puppeteer.launch({headless: false}); // default is true
@@ -173,7 +173,7 @@ pass in the executable's path when creating a `Browser` instance:
const browser = await puppeteer.launch({executablePath: '/path/to/Chrome'});
```

You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch()`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#puppeteerlaunchoptions) for more information.
You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch()`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#puppeteerlaunchoptions) for more information.

See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users.

@@ -185,7 +185,7 @@ Puppeteer creates its own browser user profile which it **cleans up on every run

## Resources

- [API Documentation](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md)
- [API Documentation](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md)
- [Examples](https://github.com/puppeteer/puppeteer/tree/main/examples/)
- [Community list of Puppeteer resources](https://github.com/transitive-bullshit/awesome-puppeteer)

@@ -328,7 +328,7 @@ See [Contributing](https://github.com/puppeteer/puppeteer/blob/main/CONTRIBUTING
Official Firefox support is currently experimental. The ongoing collaboration with Mozilla aims to support common end-to-end testing use cases, for which developers expect cross-browser coverage. The Puppeteer team needs input from users to stabilize Firefox support and to bring missing APIs to our attention.
From Puppeteer v2.1.0 onwards you can specify [`puppeteer.launch({product: 'firefox'})`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#puppeteerlaunchoptions) to run your Puppeteer scripts in Firefox Nightly, without any additional custom patches. While [an older experiment](https://www.npmjs.com/package/puppeteer-firefox) required a patched version of Firefox, [the current approach](https://wiki.mozilla.org/Remote) works with “stock” Firefox.
From Puppeteer v2.1.0 onwards you can specify [`puppeteer.launch({product: 'firefox'})`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#puppeteerlaunchoptions) to run your Puppeteer scripts in Firefox Nightly, without any additional custom patches. While [an older experiment](https://www.npmjs.com/package/puppeteer-firefox) required a patched version of Firefox, [the current approach](https://wiki.mozilla.org/Remote) works with “stock” Firefox.
We will continue to collaborate with other browser vendors to bring Puppeteer support to browsers such as Safari.
This effort includes exploration of a standard for executing cross-browser commands (instead of relying on the non-standard DevTools Protocol used by Chrome).
@@ -424,7 +424,7 @@ await page.evaluate(() => {
You may find that Puppeteer does not behave as expected when controlling pages that incorporate audio and video. (For example, [video playback/screenshots is likely to fail](https://github.com/puppeteer/puppeteer/issues/291).) There are two reasons for this:
* Puppeteer is bundled with Chromium — not Chrome — and so by default, it inherits all of [Chromium's media-related limitations](https://www.chromium.org/audio-video). This means that Puppeteer does not support licensed formats such as AAC or H.264. (However, it is possible to force Puppeteer to use a separately-installed version Chrome instead of Chromium via the [`executablePath` option to `puppeteer.launch`](https://github.com/puppeteer/puppeteer/blob/v5.0.0/docs/api.md#puppeteerlaunchoptions). You should only use this configuration if you need an official release of Chrome that supports these media formats.)
* Puppeteer is bundled with Chromium — not Chrome — and so by default, it inherits all of [Chromium's media-related limitations](https://www.chromium.org/audio-video). This means that Puppeteer does not support licensed formats such as AAC or H.264. (However, it is possible to force Puppeteer to use a separately-installed version Chrome instead of Chromium via the [`executablePath` option to `puppeteer.launch`](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md#puppeteerlaunchoptions). You should only use this configuration if you need an official release of Chrome that supports these media formats.)
* Since Puppeteer (in all configurations) controls a desktop version of Chromium/Chrome, features that are only supported by the mobile version of Chrome are not supported. This means that Puppeteer [does not support HTTP Live Streaming (HLS)](https://caniuse.com/#feat=http-live-streaming).
#### Q: I am having trouble installing / running Puppeteer in my test environment. Where should I look for help?
32 changes: 28 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

# Puppeteer API <!-- GEN:version -->v5.0.0<!-- GEN:stop-->
# Puppeteer API <!-- GEN:version -->v5.1.0<!-- GEN:stop-->
<!-- GEN:empty-if-release --><!-- GEN:stop -->

- Interactive Documentation: https://pptr.dev
- API Translations: [中文|Chinese](https://zhaoqize.github.io/puppeteer-api-zh_CN/#/)
- Troubleshooting: [troubleshooting.md](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md)
- Releases per Chromium Version:
* Chromium 84.0.4147.0 - [Puppeteer v5.1.0](https://github.com/puppeteer/puppeteer/blob/v5.1.0/docs/api.md)
* Chromium 83.0.4103.0 - [Puppeteer v3.1.0](https://github.com/puppeteer/puppeteer/blob/v3.1.0/docs/api.md)
* Chromium 81.0.4044.0 - [Puppeteer v3.0.0](https://github.com/puppeteer/puppeteer/blob/v3.0.0/docs/api.md)
* Chromium 80.0.3987.0 - [Puppeteer v2.1.0](https://github.com/puppeteer/puppeteer/blob/v2.1.0/docs/api.md)
@@ -190,6 +191,7 @@
* [mouse.down([options])](#mousedownoptions)
* [mouse.move(x, y[, options])](#mousemovex-y-options)
* [mouse.up([options])](#mouseupoptions)
* [mouse.wheel([options])](#mousewheeloptions)
- [class: Touchscreen](#class-touchscreen)
* [touchscreen.tap(x, y)](#touchscreentapx-y)
- [class: Tracing](#class-tracing)
@@ -330,7 +332,7 @@
* [target.worker()](#targetworker)
- [class: CDPSession](#class-cdpsession)
* [cdpSession.detach()](#cdpsessiondetach)
* [cdpSession.send(method[, params])](#cdpsessionsendmethod-params)
* [cdpSession.send(method[, ...paramArgs])](#cdpsessionsendmethod-paramargs)
- [class: Coverage](#class-coverage)
* [coverage.startCSSCoverage([options])](#coveragestartcsscoverageoptions)
* [coverage.startJSCoverage([options])](#coveragestartjscoverageoptions)
@@ -2579,6 +2581,28 @@ Dispatches a `mousemove` event.

Dispatches a `mouseup` event.

#### mouse.wheel([options])
- `options` <[Object]>
- `deltaX` X delta in CSS pixels for mouse wheel event (default: 0). Positive values emulate a scroll up and negative values a scroll down event.
- `deltaY` Y delta in CSS pixels for mouse wheel event (default: 0). Positive values emulate a scroll right and negative values a scroll left event.
- returns: <[Promise]>

Dispatches a `mousewheel` event.

Examples:
```js
await page.goto('https://mdn.mozillademos.org/en-US/docs/Web/API/Element/wheel_event$samples/Scaling_an_element_via_the_wheel?revision=1587366');

const elem = await page.$('div');
const boundingBox = await elem.boundingBox();
await page.mouse.move(
boundingBox.x + boundingBox.width / 2,
boundingBox.y + boundingBox.height / 2
);

await page.mouse.wheel({ deltaY: -100 })
```

### class: Touchscreen

#### touchscreen.tap(x, y)
@@ -3923,9 +3947,9 @@ await client.send('Animation.setPlaybackRate', {
Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used
to send messages.

#### cdpSession.send(method[, params])
#### cdpSession.send(method[, ...paramArgs])
- `method` <[string]> protocol method name
- `params` <[Object]> Optional method parameters
- `...paramArgs` <[Object]> Optional method parameters
- returns: <[Promise]<[Object]>>

### class: Coverage
15 changes: 14 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
<!-- GEN:toc -->
- [Chrome headless doesn't launch on Windows](#chrome-headless-doesnt-launch-on-windows)
- [Chrome headless doesn't launch on UNIX](#chrome-headless-doesnt-launch-on-unix)
- [Chrome is downloaded but fails to launch on Node.js 14](#chrome-is-downloaded-but-fails-to-launch-on-nodejs-14)
- [Setting Up Chrome Linux Sandbox](#setting-up-chrome-linux-sandbox)
* [[recommended] Enable user namespace cloning](#recommended-enable-user-namespace-cloning)
* [[alternative] Setup setuid sandbox](#alternative-setup-setuid-sandbox)
@@ -130,9 +131,21 @@ yum update nss -y
- [#379](https://github.com/puppeteer/puppeteer/issues/379) - Alpine troubleshooting <br/>
</details>

## Chrome is downloaded but fails to launch on Node.js 14

If you get an error that looks like this when trying to launch Chromium:

```
(node:15505) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
spawn /Users/.../node_modules/puppeteer/.local-chromium/mac-756035/chrome-mac/Chromium.app/Contents/MacOS/Chromium ENOENT
```

This means that the browser was downloaded but failed to be extracted correctly. The most common cause is a bug in Node.js v14.0.0 which broke `extract-zip`, the module Puppeteer uses to extract browser downloads into the right place. The bug was fixed in Node.js v14.1.0, so please make sure you're running that version or higher. Alternatively, if you cannot upgrade, you could downgrade to Node.js v12, but we recommend upgrading when possible.


## Setting Up Chrome Linux Sandbox

In order to protect the host environment from untrusted web content, Chrome uses [multiple layers of sandboxing](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_sandboxing.md). For this to work properly,
In order to protect the host environment from untrusted web content, Chrome uses [multiple layers of sandboxing](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux/sandboxing.md). For this to work properly,
the host should be configured first. If there's no good sandbox for Chrome to use, it will crash
with the error `No usable sandbox!`.

2 changes: 2 additions & 0 deletions new-docs/puppeteer.browser.md
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ export declare class Browser extends EventEmitter
## Remarks
The Browser class extends from Puppeteer's [EventEmitter](./puppeteer.eventemitter.md) class and will emit various events which are documented in the [BrowserEmittedEvents](./puppeteer.browseremittedevents.md) enum.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Browser` class.
## Example 1
2 changes: 2 additions & 0 deletions new-docs/puppeteer.browsercontext.md
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ export declare class BrowserContext extends EventEmitter
## Remarks
The Browser class extends from Puppeteer's [EventEmitter](./puppeteer.eventemitter.md) class and will emit various events which are documented in the [BrowserContextEmittedEvents](./puppeteer.browsercontextemittedevents.md) enum.
If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser context.
Puppeteer allows creation of "incognito" browser contexts with [Browser.createIncognitoBrowserContext](./puppeteer.browser.createincognitobrowsercontext.md) method. "Incognito" browser contexts don't write any browsing data to disk.
20 changes: 20 additions & 0 deletions new-docs/puppeteer.browsercontextemittedevents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserContextEmittedEvents](./puppeteer.browsercontextemittedevents.md)

## BrowserContextEmittedEvents enum

<b>Signature:</b>

```typescript
export declare const enum BrowserContextEmittedEvents
```

## Enumeration Members

| Member | Value | Description |
| --- | --- | --- |
| TargetChanged | <code>&quot;targetchanged&quot;</code> | Emitted when the url of a target inside the browser context changes. Contains a [Target](./puppeteer.target.md) instance. |
| TargetCreated | <code>&quot;targetcreated&quot;</code> | Emitted when a target is created within the browser context, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browserContext.newPage](./puppeteer.browsercontext.newpage.md)<!-- -->Contains a [Target](./puppeteer.target.md) instance. |
| TargetDestroyed | <code>&quot;targetdestroyed&quot;</code> | Emitted when a target is destroyed within the browser context, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. |

23 changes: 23 additions & 0 deletions new-docs/puppeteer.browseremittedevents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserEmittedEvents](./puppeteer.browseremittedevents.md)

## BrowserEmittedEvents enum

All the events a [browser instance](./puppeteer.browser.md) may emit.

<b>Signature:</b>

```typescript
export declare const enum BrowserEmittedEvents
```

## Enumeration Members

| Member | Value | Description |
| --- | --- | --- |
| Disconnected | <code>&quot;disconnected&quot;</code> | Emitted when Puppeteer gets disconnected from the Chromium instance. This might happen because of one of the following:<!-- -->- Chromium is closed or crashed<!-- -->- The [browser.disconnect](./puppeteer.browser.disconnect.md) method was called. |
| TargetChanged | <code>&quot;targetchanged&quot;</code> | Emitted when the url of a target changes. Contains a [Target](./puppeteer.target.md) instance. |
| TargetCreated | <code>&quot;targetcreated&quot;</code> | Emitted when a target is created, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browser.newPage](./puppeteer.browser.newpage.md)<!-- -->Contains a [Target](./puppeteer.target.md) instance. |
| TargetDestroyed | <code>&quot;targetdestroyed&quot;</code> | Emitted when a target is destroyed, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. |

Loading