chrome-devtools-frontend 1.0.1037221 → 1.0.1039140

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/config/gni/devtools_grd_files.gni +9 -2
  2. package/front_end/core/common/ParsedURL.ts +1 -1
  3. package/front_end/core/i18n/locales/en-US.json +2 -2
  4. package/front_end/core/i18n/locales/en-XL.json +2 -2
  5. package/front_end/core/sdk/ResourceTreeModel.ts +12 -8
  6. package/front_end/panels/sources/NavigatorView.ts +9 -0
  7. package/front_end/services/puppeteer/PuppeteerConnection.ts +1 -1
  8. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +244 -244
  9. package/front_end/third_party/lighthouse/locales/en-US.json +2 -2
  10. package/front_end/third_party/lighthouse/locales/en-XL.json +2 -2
  11. package/front_end/third_party/puppeteer/package/README.md +20 -0
  12. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.d.ts +3 -3
  13. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js +4 -4
  14. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js.map +1 -1
  15. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
  16. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +10 -8
  17. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
  18. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +19 -6
  19. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
  20. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +23 -10
  21. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
  22. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  23. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -2
  24. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  25. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
  26. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js +35 -20
  27. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js.map +1 -1
  28. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +9 -2
  29. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
  30. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +19 -7
  31. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
  32. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +5 -4
  33. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
  34. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +6 -5
  35. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
  36. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts +1 -0
  37. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts.map +1 -1
  38. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js +1 -0
  39. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js.map +1 -1
  40. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +2 -0
  41. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts.map +1 -1
  42. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js +3 -1
  43. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js.map +1 -1
  44. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts +168 -131
  45. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -1
  46. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +208 -206
  47. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -1
  48. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +1 -0
  49. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +1 -0
  51. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +2 -2
  53. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +2 -2
  54. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +74 -75
  55. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
  56. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +82 -97
  57. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
  58. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +16 -8
  59. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts.map +1 -1
  60. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js +17 -9
  61. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js.map +1 -1
  62. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts +2 -1
  63. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
  64. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js +3 -2
  65. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js.map +1 -1
  66. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts +634 -0
  67. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts.map +1 -0
  68. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js +713 -0
  69. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js.map +1 -0
  70. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +9 -679
  71. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
  72. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +77 -803
  73. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
  74. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +11 -10
  75. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  76. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +11 -10
  77. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +2 -2
  79. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
  80. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +1 -1
  81. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +34 -13
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +35 -14
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DOMWorld.d.ts → IsolatedWorld.d.ts} +58 -13
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts.map +1 -0
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DOMWorld.js → IsolatedWorld.js} +124 -151
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js.map +1 -0
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +40 -58
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +53 -76
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +2 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +23 -6
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +17 -17
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +8 -8
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +2 -0
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +395 -296
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +398 -313
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +14 -7
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +14 -7
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +38 -17
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +49 -31
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +7 -3
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts +1 -0
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js +4 -2
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +8 -4
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js +8 -4
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +1 -34
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +5 -53
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +3 -0
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -0
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +6 -0
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -0
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.d.ts.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js +2 -2
  141. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js.map +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts +28 -0
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts.map +1 -0
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js +148 -0
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js.map +1 -0
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +2 -0
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts.map +1 -0
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js +18 -0
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js.map +1 -0
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +3 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +4 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +4 -3
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -2
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +2 -2
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +3 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +3 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts +3 -2
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js +3 -2
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts +25 -0
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts.map +1 -0
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js +78 -0
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js.map +1 -0
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.d.ts +17 -0
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.d.ts.map +1 -0
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.js +22 -0
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.js.map +1 -0
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{common → util}/assert.d.ts +0 -0
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/assert.d.ts.map +1 -0
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{common → util}/assert.js +0 -0
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/assert.js.map +1 -0
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts +2 -0
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts.map +1 -0
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js +19 -0
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js.map +1 -0
  189. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +3 -3
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +4 -4
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +10 -8
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +19 -6
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +23 -10
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -2
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js +36 -21
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +9 -2
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +19 -7
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +5 -4
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +6 -5
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +1 -0
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +1 -0
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +2 -0
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +3 -1
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts +168 -131
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +208 -206
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +1 -0
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +1 -0
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +2 -2
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +2 -2
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +74 -75
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +83 -98
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +16 -8
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +17 -9
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts +2 -1
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js +3 -2
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js.map +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts +634 -0
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts.map +1 -0
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js +709 -0
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js.map +1 -0
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +9 -679
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +72 -797
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +11 -10
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +11 -10
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +2 -2
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +1 -1
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +34 -13
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +35 -14
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js.map +1 -1
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DOMWorld.d.ts → IsolatedWorld.d.ts} +58 -13
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts.map +1 -0
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DOMWorld.js → IsolatedWorld.js} +123 -150
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js.map +1 -0
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +40 -58
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +54 -77
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +2 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +24 -7
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +17 -17
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -1
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +8 -8
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +2 -0
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +395 -296
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +398 -313
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +14 -7
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +14 -7
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
  290. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +38 -17
  291. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
  292. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +49 -31
  293. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
  294. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +1 -1
  295. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
  296. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +7 -3
  297. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
  298. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +1 -0
  299. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -1
  300. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +4 -2
  301. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js.map +1 -1
  302. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +8 -4
  303. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
  304. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +8 -4
  305. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js.map +1 -1
  306. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +1 -34
  307. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
  308. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +3 -48
  309. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
  310. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +3 -0
  311. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -0
  312. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +3 -0
  313. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -0
  314. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  315. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  316. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.d.ts.map +1 -1
  317. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js +2 -2
  318. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js.map +1 -1
  319. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts +28 -0
  320. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts.map +1 -0
  321. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js +142 -0
  322. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js.map +1 -0
  323. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +2 -0
  324. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts.map +1 -0
  325. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js +2 -0
  326. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js.map +1 -0
  327. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +3 -1
  328. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
  329. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +4 -2
  330. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
  331. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
  332. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +3 -2
  333. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
  334. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  335. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -2
  336. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  337. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
  338. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +2 -2
  339. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -1
  340. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -1
  341. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js.map +1 -1
  342. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +3 -1
  343. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
  344. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +3 -1
  345. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
  346. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +3 -2
  347. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -1
  348. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +3 -2
  349. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -1
  350. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts +25 -0
  351. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts.map +1 -0
  352. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js +73 -0
  353. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js.map +1 -0
  354. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.d.ts +17 -0
  355. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.d.ts.map +1 -0
  356. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.js +17 -0
  357. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.js.map +1 -0
  358. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{common → util}/assert.d.ts +0 -0
  359. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/assert.d.ts.map +1 -0
  360. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{common → util}/assert.js +0 -0
  361. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/assert.js.map +1 -0
  362. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts +2 -0
  363. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts.map +1 -0
  364. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js +15 -0
  365. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js.map +1 -0
  366. package/front_end/third_party/puppeteer/package/lib/types.d.ts +1069 -878
  367. package/front_end/third_party/puppeteer/package/package.json +32 -28
  368. package/front_end/third_party/puppeteer/package/typescript-if-required.js +1 -1
  369. package/front_end/third_party/puppeteer/puppeteer.ts +1 -1
  370. package/front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts +16 -6
  371. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +28 -4
  372. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +15 -0
  373. package/front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css +27 -12
  374. package/front_end/ui/components/linear_memory_inspector/linearMemoryViewer.css +19 -4
  375. package/package.json +1 -1
  376. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +0 -1
  377. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +0 -1
  378. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts.map +0 -1
  379. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js.map +0 -1
  380. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +0 -1
  381. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +0 -1
  382. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +0 -1
  383. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js.map +0 -1
@@ -15,10 +15,10 @@
15
15
  */
16
16
  import { Protocol } from 'devtools-protocol';
17
17
  import { CDPSession } from './Connection.js';
18
- import { EvaluateFunc, HandleFor, HandleOr } from './types.js';
18
+ import type { ElementHandle } from './ElementHandle.js';
19
19
  import { ExecutionContext } from './ExecutionContext.js';
20
20
  import { MouseButton } from './Input.js';
21
- import type { ElementHandle } from './ElementHandle.js';
21
+ import { EvaluateFunc, HandleFor, HandleOr } from './types.js';
22
22
  declare const __JSHandleSymbol: unique symbol;
23
23
  /**
24
24
  * @public
@@ -45,21 +45,24 @@ export interface BoundingBox extends Point {
45
45
  height: number;
46
46
  }
47
47
  /**
48
- * Represents an in-page JavaScript object. JSHandles can be created with the
49
- * {@link Page.evaluateHandle | page.evaluateHandle} method.
48
+ * Represents a reference to a JavaScript object. Instances can be created using
49
+ * {@link Page.evaluateHandle}.
50
+ *
51
+ * Handles prevent the referenced JavaScript object from being garbage-collected
52
+ * unless the handle is purposely {@link JSHandle.dispose | disposed}. JSHandles
53
+ * are auto-disposed when their associated frame is navigated away or the parent
54
+ * context gets destroyed.
55
+ *
56
+ * Handles can be used as arguments for any evaluation function such as
57
+ * {@link Page.$eval}, {@link Page.evaluate}, and {@link Page.evaluateHandle}.
58
+ * They are resolved to their referenced object.
50
59
  *
51
60
  * @example
61
+ *
52
62
  * ```ts
53
63
  * const windowHandle = await page.evaluateHandle(() => window);
54
64
  * ```
55
65
  *
56
- * JSHandle prevents the referenced JavaScript object from being garbage-collected
57
- * unless the handle is {@link JSHandle.dispose | disposed}. JSHandles are auto-
58
- * disposed when their origin frame gets navigated or the parent context gets destroyed.
59
- *
60
- * JSHandle instances can be used as arguments for {@link Page.$eval},
61
- * {@link Page.evaluate}, and {@link Page.evaluateHandle}.
62
- *
63
66
  * @public
64
67
  */
65
68
  export declare class JSHandle<T = unknown> {
@@ -71,55 +74,32 @@ export declare class JSHandle<T = unknown> {
71
74
  /**
72
75
  * @internal
73
76
  */
74
- get _client(): CDPSession;
77
+ get client(): CDPSession;
75
78
  /**
76
79
  * @internal
77
80
  */
78
- get _disposed(): boolean;
79
- /**
80
- * @internal
81
- */
82
- get _remoteObject(): Protocol.Runtime.RemoteObject;
83
- /**
84
- * @internal
85
- */
86
- get _context(): ExecutionContext;
81
+ get disposed(): boolean;
87
82
  /**
88
83
  * @internal
89
84
  */
90
85
  constructor(context: ExecutionContext, client: CDPSession, remoteObject: Protocol.Runtime.RemoteObject);
91
- /** Returns the execution context the handle belongs to.
86
+ /**
87
+ * @returns The execution context the handle belongs to.
92
88
  */
93
89
  executionContext(): ExecutionContext;
94
90
  /**
95
- * This method passes this handle as the first argument to `pageFunction`. If
96
- * `pageFunction` returns a Promise, then `handle.evaluate` would wait for the
97
- * promise to resolve and return its value.
91
+ * Evaluates the given function with the current handle as its first argument.
98
92
  *
99
- * @example
100
- * ```ts
101
- * const tweetHandle = await page.$('.tweet .retweets');
102
- * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10');
103
- * ```
93
+ * @see {@link ExecutionContext.evaluate} for more details.
104
94
  */
105
95
  evaluate<Params extends unknown[], Func extends EvaluateFunc<[this, ...Params]> = EvaluateFunc<[
106
96
  this,
107
97
  ...Params
108
98
  ]>>(pageFunction: Func | string, ...args: Params): Promise<Awaited<ReturnType<Func>>>;
109
99
  /**
110
- * This method passes this handle as the first argument to `pageFunction`.
111
- *
112
- * @remarks
100
+ * Evaluates the given function with the current handle as its first argument.
113
101
  *
114
- * The only difference between `jsHandle.evaluate` and
115
- * `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle` returns an
116
- * in-page object (JSHandle).
117
- *
118
- * If the function passed to `jsHandle.evaluateHandle` returns a Promise, then
119
- * `evaluateHandle.evaluateHandle` waits for the promise to resolve and
120
- * returns its value.
121
- *
122
- * See {@link Page.evaluateHandle} for more details.
102
+ * @see {@link ExecutionContext.evaluateHandle} for more details.
123
103
  */
124
104
  evaluateHandle<Params extends unknown[], Func extends EvaluateFunc<[this, ...Params]> = EvaluateFunc<[
125
105
  this,
@@ -131,51 +111,53 @@ export declare class JSHandle<T = unknown> {
131
111
  getProperty<K extends keyof T>(propertyName: HandleOr<K>): Promise<HandleFor<T[K]>>;
132
112
  getProperty(propertyName: string): Promise<JSHandle<unknown>>;
133
113
  /**
134
- * The method returns a map with property names as keys and JSHandle instances
135
- * for the property values.
114
+ * Gets a map of handles representing the properties of the current handle.
136
115
  *
137
116
  * @example
117
+ *
138
118
  * ```ts
139
119
  * const listHandle = await page.evaluateHandle(() => document.body.children);
140
120
  * const properties = await listHandle.getProperties();
141
121
  * const children = [];
142
122
  * for (const property of properties.values()) {
143
123
  * const element = property.asElement();
144
- * if (element)
124
+ * if (element) {
145
125
  * children.push(element);
126
+ * }
146
127
  * }
147
128
  * children; // holds elementHandles to all children of document.body
148
129
  * ```
149
130
  */
150
131
  getProperties(): Promise<Map<string, JSHandle>>;
151
132
  /**
152
- * @returns Returns a JSON representation of the object.If the object has a
153
- * `toJSON` function, it will not be called.
154
- * @remarks
133
+ * @returns A vanilla object representing the serializable portions of the
134
+ * referenced object.
135
+ * @throws Throws if the object cannot be serialized due to circularity.
155
136
  *
156
- * The JSON is generated by running {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify | JSON.stringify}
157
- * on the object in page and consequent {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse} in puppeteer.
158
- * **NOTE** The method throws if the referenced object is not stringifiable.
137
+ * @remarks
138
+ * If the object has a `toJSON` function, it **will not** be called.
159
139
  */
160
- jsonValue<T = unknown>(): Promise<T>;
140
+ jsonValue(): Promise<T>;
161
141
  /**
162
- * @returns Either `null` or the object handle itself, if the object
163
- * handle is an instance of {@link ElementHandle}.
142
+ * @returns Either `null` or the handle itself if the handle is an
143
+ * instance of {@link ElementHandle}.
164
144
  */
165
145
  asElement(): ElementHandle<Node> | null;
166
146
  /**
167
- * Stops referencing the element handle, and resolves when the object handle is
168
- * successfully disposed of.
147
+ * Releases the object referenced by the handle for garbage collection.
169
148
  */
170
149
  dispose(): Promise<void>;
171
150
  /**
172
151
  * Returns a string representation of the JSHandle.
173
152
  *
174
- * @remarks Useful during debugging.
153
+ * @remarks
154
+ * Useful during debugging.
175
155
  */
176
156
  toString(): string;
177
157
  /**
178
- * Provides access to [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject) backing this JSHandle.
158
+ * Provides access to the
159
+ * [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject)
160
+ * backing this handle.
179
161
  */
180
162
  remoteObject(): Protocol.Runtime.RemoteObject;
181
163
  }
@@ -1 +1 @@
1
- {"version":3,"file":"JSHandle.d.ts","sourceRoot":"","sources":["../../../../src/common/JSHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEtD,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,MAAM,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAA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GAAG,IAAI;IAIvC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B;;;;;OAKG;IACH,QAAQ,IAAI,MAAM;IAQlB;;;;OAIG;IACH,YAAY,IAAI,QAAQ,CAAC,OAAO,CAAC,YAAY;CAG9C;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX"}
@@ -25,24 +25,27 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
25
25
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
26
26
  };
27
27
  var _JSHandle_client, _JSHandle_disposed, _JSHandle_context, _JSHandle_remoteObject;
28
- import { assert } from './assert.js';
29
- import { releaseObject, valueFromRemoteObject, createJSHandle } from './util.js';
28
+ import { assert } from '../util/assert.js';
29
+ import { createJSHandle, releaseObject, valueFromRemoteObject } from './util.js';
30
30
  /**
31
- * Represents an in-page JavaScript object. JSHandles can be created with the
32
- * {@link Page.evaluateHandle | page.evaluateHandle} method.
31
+ * Represents a reference to a JavaScript object. Instances can be created using
32
+ * {@link Page.evaluateHandle}.
33
+ *
34
+ * Handles prevent the referenced JavaScript object from being garbage-collected
35
+ * unless the handle is purposely {@link JSHandle.dispose | disposed}. JSHandles
36
+ * are auto-disposed when their associated frame is navigated away or the parent
37
+ * context gets destroyed.
38
+ *
39
+ * Handles can be used as arguments for any evaluation function such as
40
+ * {@link Page.$eval}, {@link Page.evaluate}, and {@link Page.evaluateHandle}.
41
+ * They are resolved to their referenced object.
33
42
  *
34
43
  * @example
44
+ *
35
45
  * ```ts
36
46
  * const windowHandle = await page.evaluateHandle(() => window);
37
47
  * ```
38
48
  *
39
- * JSHandle prevents the referenced JavaScript object from being garbage-collected
40
- * unless the handle is {@link JSHandle.dispose | disposed}. JSHandles are auto-
41
- * disposed when their origin frame gets navigated or the parent context gets destroyed.
42
- *
43
- * JSHandle instances can be used as arguments for {@link Page.$eval},
44
- * {@link Page.evaluate}, and {@link Page.evaluateHandle}.
45
- *
46
49
  * @public
47
50
  */
48
51
  export class JSHandle {
@@ -61,88 +64,64 @@ export class JSHandle {
61
64
  /**
62
65
  * @internal
63
66
  */
64
- get _client() {
67
+ get client() {
65
68
  return __classPrivateFieldGet(this, _JSHandle_client, "f");
66
69
  }
67
70
  /**
68
71
  * @internal
69
72
  */
70
- get _disposed() {
73
+ get disposed() {
71
74
  return __classPrivateFieldGet(this, _JSHandle_disposed, "f");
72
75
  }
73
76
  /**
74
- * @internal
75
- */
76
- get _remoteObject() {
77
- return __classPrivateFieldGet(this, _JSHandle_remoteObject, "f");
78
- }
79
- /**
80
- * @internal
81
- */
82
- get _context() {
83
- return __classPrivateFieldGet(this, _JSHandle_context, "f");
84
- }
85
- /** Returns the execution context the handle belongs to.
77
+ * @returns The execution context the handle belongs to.
86
78
  */
87
79
  executionContext() {
88
80
  return __classPrivateFieldGet(this, _JSHandle_context, "f");
89
81
  }
90
82
  /**
91
- * This method passes this handle as the first argument to `pageFunction`. If
92
- * `pageFunction` returns a Promise, then `handle.evaluate` would wait for the
93
- * promise to resolve and return its value.
83
+ * Evaluates the given function with the current handle as its first argument.
94
84
  *
95
- * @example
96
- * ```ts
97
- * const tweetHandle = await page.$('.tweet .retweets');
98
- * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10');
99
- * ```
85
+ * @see {@link ExecutionContext.evaluate} for more details.
100
86
  */
101
87
  async evaluate(pageFunction, ...args) {
102
88
  return await this.executionContext().evaluate(pageFunction, this, ...args);
103
89
  }
104
90
  /**
105
- * This method passes this handle as the first argument to `pageFunction`.
106
- *
107
- * @remarks
108
- *
109
- * The only difference between `jsHandle.evaluate` and
110
- * `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle` returns an
111
- * in-page object (JSHandle).
112
- *
113
- * If the function passed to `jsHandle.evaluateHandle` returns a Promise, then
114
- * `evaluateHandle.evaluateHandle` waits for the promise to resolve and
115
- * returns its value.
91
+ * Evaluates the given function with the current handle as its first argument.
116
92
  *
117
- * See {@link Page.evaluateHandle} for more details.
93
+ * @see {@link ExecutionContext.evaluateHandle} for more details.
118
94
  */
119
95
  async evaluateHandle(pageFunction, ...args) {
120
96
  return await this.executionContext().evaluateHandle(pageFunction, this, ...args);
121
97
  }
122
98
  async getProperty(propertyName) {
123
- return await this.evaluateHandle((object, propertyName) => {
99
+ return this.evaluateHandle((object, propertyName) => {
124
100
  return object[propertyName];
125
101
  }, propertyName);
126
102
  }
127
103
  /**
128
- * The method returns a map with property names as keys and JSHandle instances
129
- * for the property values.
104
+ * Gets a map of handles representing the properties of the current handle.
130
105
  *
131
106
  * @example
107
+ *
132
108
  * ```ts
133
109
  * const listHandle = await page.evaluateHandle(() => document.body.children);
134
110
  * const properties = await listHandle.getProperties();
135
111
  * const children = [];
136
112
  * for (const property of properties.values()) {
137
113
  * const element = property.asElement();
138
- * if (element)
114
+ * if (element) {
139
115
  * children.push(element);
116
+ * }
140
117
  * }
141
118
  * children; // holds elementHandles to all children of document.body
142
119
  * ```
143
120
  */
144
121
  async getProperties() {
145
122
  assert(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId);
123
+ // We use Runtime.getProperties rather than iterative building because the
124
+ // iterative approach might create a distorted snapshot.
146
125
  const response = await __classPrivateFieldGet(this, _JSHandle_client, "f").send('Runtime.getProperties', {
147
126
  objectId: __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId,
148
127
  ownProperties: true,
@@ -157,39 +136,34 @@ export class JSHandle {
157
136
  return result;
158
137
  }
159
138
  /**
160
- * @returns Returns a JSON representation of the object.If the object has a
161
- * `toJSON` function, it will not be called.
162
- * @remarks
139
+ * @returns A vanilla object representing the serializable portions of the
140
+ * referenced object.
141
+ * @throws Throws if the object cannot be serialized due to circularity.
163
142
  *
164
- * The JSON is generated by running {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify | JSON.stringify}
165
- * on the object in page and consequent {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse} in puppeteer.
166
- * **NOTE** The method throws if the referenced object is not stringifiable.
143
+ * @remarks
144
+ * If the object has a `toJSON` function, it **will not** be called.
167
145
  */
168
146
  async jsonValue() {
169
- if (__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
170
- const response = await __classPrivateFieldGet(this, _JSHandle_client, "f").send('Runtime.callFunctionOn', {
171
- functionDeclaration: 'function() { return this; }',
172
- objectId: __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId,
173
- returnByValue: true,
174
- awaitPromise: true,
175
- });
176
- return valueFromRemoteObject(response.result);
147
+ if (!__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
148
+ return valueFromRemoteObject(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
177
149
  }
178
- return valueFromRemoteObject(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
150
+ const value = await this.evaluate(object => {
151
+ return object;
152
+ });
153
+ if (value === undefined) {
154
+ throw new Error('Could not serialize referenced object');
155
+ }
156
+ return value;
179
157
  }
180
158
  /**
181
- * @returns Either `null` or the object handle itself, if the object
182
- * handle is an instance of {@link ElementHandle}.
159
+ * @returns Either `null` or the handle itself if the handle is an
160
+ * instance of {@link ElementHandle}.
183
161
  */
184
162
  asElement() {
185
- /* This always returns null, but subclasses can override this and return an
186
- ElementHandle.
187
- */
188
163
  return null;
189
164
  }
190
165
  /**
191
- * Stops referencing the element handle, and resolves when the object handle is
192
- * successfully disposed of.
166
+ * Releases the object referenced by the handle for garbage collection.
193
167
  */
194
168
  async dispose() {
195
169
  if (__classPrivateFieldGet(this, _JSHandle_disposed, "f")) {
@@ -201,17 +175,20 @@ export class JSHandle {
201
175
  /**
202
176
  * Returns a string representation of the JSHandle.
203
177
  *
204
- * @remarks Useful during debugging.
178
+ * @remarks
179
+ * Useful during debugging.
205
180
  */
206
181
  toString() {
207
- if (__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
208
- const type = __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").subtype || __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").type;
209
- return 'JSHandle@' + type;
182
+ if (!__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
183
+ return 'JSHandle:' + valueFromRemoteObject(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
210
184
  }
211
- return 'JSHandle:' + valueFromRemoteObject(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
185
+ const type = __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").subtype || __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").type;
186
+ return 'JSHandle@' + type;
212
187
  }
213
188
  /**
214
- * Provides access to [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject) backing this JSHandle.
189
+ * Provides access to the
190
+ * [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject)
191
+ * backing this handle.
215
192
  */
216
193
  remoteObject() {
217
194
  return __classPrivateFieldGet(this, _JSHandle_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aAAa,CAAC,uBAAA,IAAI,wBAAQ,EAAE,uBAAA,IAAI,8BAAc,CAAC,CAAC;IACxD,CAAC;IAED;;;;;OAKG;IACH,QAAQ;QACN,IAAI,CAAC,uBAAA,IAAI,8BAAc,CAAC,QAAQ,EAAE;YAChC,OAAO,WAAW,GAAG,qBAAqB,CAAC,uBAAA,IAAI,8BAAc,CAAC,CAAC;SAChE;QACD,MAAM,IAAI,GAAG,uBAAA,IAAI,8BAAc,CAAC,OAAO,IAAI,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC;QACnE,OAAO,WAAW,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,YAAY;QACV,OAAO,uBAAA,IAAI,8BAAc,CAAC;IAC5B,CAAC;CACF"}
@@ -14,7 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { TimeoutError } from './Errors.js';
17
- import { FrameManager, Frame } from './FrameManager.js';
17
+ import { FrameManager } from './FrameManager.js';
18
+ import { Frame } from './Frame.js';
18
19
  import { HTTPResponse } from './HTTPResponse.js';
19
20
  /**
20
21
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"LifecycleWatcher.d.ts","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,KAAK,EAEN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAG/C;;GAEG;AACH,oBAAY,uBAAuB,GAC/B,MAAM,GACN,kBAAkB,GAClB,cAAc,GACd,cAAc,CAAC;AAEnB;;GAEG;AACH,oBAAY,sBAAsB,GAC9B,MAAM,GACN,kBAAkB,GAClB,aAAa,GACb,mBAAmB,CAAC;AAcxB;;GAEG;AACH,qBAAa,gBAAgB;;gBAsCzB,YAAY,EAAE,YAAY,EAC1B,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AAG,SAAS,CAAC;IAI1D,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC,2BAA2B,IAAI,OAAO,CAAC,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC;IAyExE,OAAO,IAAI,IAAI;CAIhB"}
@@ -24,11 +24,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
24
24
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
25
25
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
26
26
  };
27
- var _LifecycleWatcher_instances, _LifecycleWatcher_expectedLifecycle, _LifecycleWatcher_frameManager, _LifecycleWatcher_frame, _LifecycleWatcher_timeout, _LifecycleWatcher_navigationRequest, _LifecycleWatcher_eventListeners, _LifecycleWatcher_initialLoaderId, _LifecycleWatcher_sameDocumentNavigationCompleteCallback, _LifecycleWatcher_sameDocumentNavigationPromise, _LifecycleWatcher_lifecycleCallback, _LifecycleWatcher_lifecyclePromise, _LifecycleWatcher_newDocumentNavigationCompleteCallback, _LifecycleWatcher_newDocumentNavigationPromise, _LifecycleWatcher_terminationCallback, _LifecycleWatcher_terminationPromise, _LifecycleWatcher_timeoutPromise, _LifecycleWatcher_maximumTimer, _LifecycleWatcher_hasSameDocumentNavigation, _LifecycleWatcher_swapped, _LifecycleWatcher_onRequest, _LifecycleWatcher_onFrameDetached, _LifecycleWatcher_terminate, _LifecycleWatcher_createTimeoutPromise, _LifecycleWatcher_navigatedWithinDocument, _LifecycleWatcher_navigated, _LifecycleWatcher_frameSwapped, _LifecycleWatcher_checkLifecycleComplete;
28
- import { assert } from './assert.js';
27
+ var _LifecycleWatcher_instances, _LifecycleWatcher_expectedLifecycle, _LifecycleWatcher_frameManager, _LifecycleWatcher_frame, _LifecycleWatcher_timeout, _LifecycleWatcher_navigationRequest, _LifecycleWatcher_eventListeners, _LifecycleWatcher_initialLoaderId, _LifecycleWatcher_sameDocumentNavigationCompleteCallback, _LifecycleWatcher_sameDocumentNavigationPromise, _LifecycleWatcher_lifecycleCallback, _LifecycleWatcher_lifecyclePromise, _LifecycleWatcher_newDocumentNavigationCompleteCallback, _LifecycleWatcher_newDocumentNavigationPromise, _LifecycleWatcher_terminationCallback, _LifecycleWatcher_terminationPromise, _LifecycleWatcher_timeoutPromise, _LifecycleWatcher_maximumTimer, _LifecycleWatcher_hasSameDocumentNavigation, _LifecycleWatcher_swapped, _LifecycleWatcher_navigationResponseReceived, _LifecycleWatcher_onRequest, _LifecycleWatcher_onResponse, _LifecycleWatcher_onFrameDetached, _LifecycleWatcher_terminate, _LifecycleWatcher_createTimeoutPromise, _LifecycleWatcher_navigatedWithinDocument, _LifecycleWatcher_navigated, _LifecycleWatcher_frameSwapped, _LifecycleWatcher_checkLifecycleComplete;
28
+ import { assert } from '../util/assert.js';
29
29
  import { addEventListener, removeEventListeners, } from './util.js';
30
+ import { createDeferredPromise, } from '../util/DeferredPromise.js';
30
31
  import { TimeoutError } from './Errors.js';
31
- import { FrameManagerEmittedEvents, } from './FrameManager.js';
32
+ import { FrameManagerEmittedEvents } from './FrameManager.js';
32
33
  import { NetworkManagerEmittedEvents } from './NetworkManager.js';
33
34
  import { CDPSessionEmittedEvents } from './Connection.js';
34
35
  const puppeteerToProtocolLifecycle = new Map([
@@ -71,6 +72,7 @@ export class LifecycleWatcher {
71
72
  _LifecycleWatcher_maximumTimer.set(this, void 0);
72
73
  _LifecycleWatcher_hasSameDocumentNavigation.set(this, void 0);
73
74
  _LifecycleWatcher_swapped.set(this, void 0);
75
+ _LifecycleWatcher_navigationResponseReceived.set(this, void 0);
74
76
  if (Array.isArray(waitUntil)) {
75
77
  waitUntil = waitUntil.slice();
76
78
  }
@@ -87,19 +89,22 @@ export class LifecycleWatcher {
87
89
  __classPrivateFieldSet(this, _LifecycleWatcher_frame, frame, "f");
88
90
  __classPrivateFieldSet(this, _LifecycleWatcher_timeout, timeout, "f");
89
91
  __classPrivateFieldSet(this, _LifecycleWatcher_eventListeners, [
90
- addEventListener(frameManager._client, CDPSessionEmittedEvents.Disconnected, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_terminate).bind(this, new Error('Navigation failed because browser has disconnected!'))),
92
+ addEventListener(frameManager.client, CDPSessionEmittedEvents.Disconnected, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_terminate).bind(this, new Error('Navigation failed because browser has disconnected!'))),
91
93
  addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManagerEmittedEvents.LifecycleEvent, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).bind(this)),
92
94
  addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManagerEmittedEvents.FrameNavigatedWithinDocument, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigatedWithinDocument).bind(this)),
93
95
  addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManagerEmittedEvents.FrameNavigated, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigated).bind(this)),
94
96
  addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManagerEmittedEvents.FrameSwapped, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_frameSwapped).bind(this)),
95
97
  addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManagerEmittedEvents.FrameDetached, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onFrameDetached).bind(this)),
96
- addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager(), NetworkManagerEmittedEvents.Request, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onRequest).bind(this)),
98
+ addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManagerEmittedEvents.Request, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onRequest).bind(this)),
99
+ addEventListener(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManagerEmittedEvents.Response, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onResponse).bind(this)),
97
100
  ], "f");
98
101
  __classPrivateFieldSet(this, _LifecycleWatcher_timeoutPromise, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_createTimeoutPromise).call(this), "f");
99
102
  __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this);
100
103
  }
101
104
  async navigationResponse() {
102
- // We may need to wait for ExtraInfo events before the request is complete.
105
+ var _a;
106
+ // Continue with a possibly null response.
107
+ await ((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.catch(() => { }));
103
108
  return __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f") ? __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f").response() : null;
104
109
  }
105
110
  sameDocumentNavigationPromise() {
@@ -119,11 +124,23 @@ export class LifecycleWatcher {
119
124
  __classPrivateFieldGet(this, _LifecycleWatcher_maximumTimer, "f") !== undefined && clearTimeout(__classPrivateFieldGet(this, _LifecycleWatcher_maximumTimer, "f"));
120
125
  }
121
126
  }
122
- _LifecycleWatcher_expectedLifecycle = new WeakMap(), _LifecycleWatcher_frameManager = new WeakMap(), _LifecycleWatcher_frame = new WeakMap(), _LifecycleWatcher_timeout = new WeakMap(), _LifecycleWatcher_navigationRequest = new WeakMap(), _LifecycleWatcher_eventListeners = new WeakMap(), _LifecycleWatcher_initialLoaderId = new WeakMap(), _LifecycleWatcher_sameDocumentNavigationCompleteCallback = new WeakMap(), _LifecycleWatcher_sameDocumentNavigationPromise = new WeakMap(), _LifecycleWatcher_lifecycleCallback = new WeakMap(), _LifecycleWatcher_lifecyclePromise = new WeakMap(), _LifecycleWatcher_newDocumentNavigationCompleteCallback = new WeakMap(), _LifecycleWatcher_newDocumentNavigationPromise = new WeakMap(), _LifecycleWatcher_terminationCallback = new WeakMap(), _LifecycleWatcher_terminationPromise = new WeakMap(), _LifecycleWatcher_timeoutPromise = new WeakMap(), _LifecycleWatcher_maximumTimer = new WeakMap(), _LifecycleWatcher_hasSameDocumentNavigation = new WeakMap(), _LifecycleWatcher_swapped = new WeakMap(), _LifecycleWatcher_instances = new WeakSet(), _LifecycleWatcher_onRequest = function _LifecycleWatcher_onRequest(request) {
127
+ _LifecycleWatcher_expectedLifecycle = new WeakMap(), _LifecycleWatcher_frameManager = new WeakMap(), _LifecycleWatcher_frame = new WeakMap(), _LifecycleWatcher_timeout = new WeakMap(), _LifecycleWatcher_navigationRequest = new WeakMap(), _LifecycleWatcher_eventListeners = new WeakMap(), _LifecycleWatcher_initialLoaderId = new WeakMap(), _LifecycleWatcher_sameDocumentNavigationCompleteCallback = new WeakMap(), _LifecycleWatcher_sameDocumentNavigationPromise = new WeakMap(), _LifecycleWatcher_lifecycleCallback = new WeakMap(), _LifecycleWatcher_lifecyclePromise = new WeakMap(), _LifecycleWatcher_newDocumentNavigationCompleteCallback = new WeakMap(), _LifecycleWatcher_newDocumentNavigationPromise = new WeakMap(), _LifecycleWatcher_terminationCallback = new WeakMap(), _LifecycleWatcher_terminationPromise = new WeakMap(), _LifecycleWatcher_timeoutPromise = new WeakMap(), _LifecycleWatcher_maximumTimer = new WeakMap(), _LifecycleWatcher_hasSameDocumentNavigation = new WeakMap(), _LifecycleWatcher_swapped = new WeakMap(), _LifecycleWatcher_navigationResponseReceived = new WeakMap(), _LifecycleWatcher_instances = new WeakSet(), _LifecycleWatcher_onRequest = function _LifecycleWatcher_onRequest(request) {
128
+ var _a, _b;
123
129
  if (request.frame() !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") || !request.isNavigationRequest()) {
124
130
  return;
125
131
  }
126
132
  __classPrivateFieldSet(this, _LifecycleWatcher_navigationRequest, request, "f");
133
+ (_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.reject(new Error('New navigation request was received'));
134
+ __classPrivateFieldSet(this, _LifecycleWatcher_navigationResponseReceived, createDeferredPromise(), "f");
135
+ if (request.response() !== null) {
136
+ (_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve();
137
+ }
138
+ }, _LifecycleWatcher_onResponse = function _LifecycleWatcher_onResponse(response) {
139
+ var _a, _b;
140
+ if (((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f")) === null || _a === void 0 ? void 0 : _a._requestId) !== response.request()._requestId) {
141
+ return;
142
+ }
143
+ (_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve();
127
144
  }, _LifecycleWatcher_onFrameDetached = function _LifecycleWatcher_onFrameDetached(frame) {
128
145
  if (__classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") === frame) {
129
146
  __classPrivateFieldGet(this, _LifecycleWatcher_terminationCallback, "f").call(null, new Error('Navigating frame was detached'));
@@ -1 +1 @@
1
- {"version":3,"file":"LifecycleWatcher.js","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAGL,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAC,2BAA2B,EAAC,MAAM,qBAAqB,CAAC;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KACR;IACD,uBAAA,IAAI,6EAAwB,MAA5B,IAAI,CAA0B,CAAC;AACjC,CAAC,2EAEa,KAAY;IACxB,IAAI,KAAK,KAAK,uBAAA,IAAI,+BAAO,EAAE;QACzB,OAAO;KACR;IACD,uBAAA,IAAI,6BAAY,IAAI,MAAA,CAAC;IACrB,uBAAA,IAAI,6EAAwB,MAA5B,IAAI,CAA0B,CAAC;AACjC,CAAC;IAGC,kCAAkC;IAClC,IAAI,CAAC,cAAc,CAAC,uBAAA,IAAI,+BAAO,EAAE,uBAAA,IAAI,2CAAmB,CAAC,EAAE;QACzD,OAAO;KACR;IACD,uBAAA,IAAI,2CAAmB,MAAvB,IAAI,CAAqB,CAAC;IAC1B,IAAI,uBAAA,IAAI,mDAA2B,EAAE;QACnC,uBAAA,IAAI,gEAAwC,MAA5C,IAAI,CAA0C,CAAC;KAChD;IACD,IAAI,uBAAA,IAAI,iCAAS,IAAI,uBAAA,IAAI,+BAAO,CAAC,SAAS,KAAK,uBAAA,IAAI,yCAAiB,EAAE;QACpE,uBAAA,IAAI,+DAAuC,MAA3C,IAAI,CAAyC,CAAC;KAC/C;IAED,SAAS,cAAc,CACrB,KAAY,EACZ,iBAA2C;QAE3C,KAAK,MAAM,KAAK,IAAI,iBAAiB,EAAE;YACrC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACtC,OAAO,KAAK,CAAC;aACd;SACF;QACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;YACvC,IACE,KAAK,CAAC,kBAAkB;gBACxB,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,EACzC;gBACA,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"LifecycleWatcher.js","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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zB,OAAO;KACR;IACD,uBAAA,IAAI,6BAAY,IAAI,MAAA,CAAC;IACrB,uBAAA,IAAI,6EAAwB,MAA5B,IAAI,CAA0B,CAAC;AACjC,CAAC;IAGC,kCAAkC;IAClC,IAAI,CAAC,cAAc,CAAC,uBAAA,IAAI,+BAAO,EAAE,uBAAA,IAAI,2CAAmB,CAAC,EAAE;QACzD,OAAO;KACR;IACD,uBAAA,IAAI,2CAAmB,MAAvB,IAAI,CAAqB,CAAC;IAC1B,IAAI,uBAAA,IAAI,mDAA2B,EAAE;QACnC,uBAAA,IAAI,gEAAwC,MAA5C,IAAI,CAA0C,CAAC;KAChD;IACD,IAAI,uBAAA,IAAI,iCAAS,IAAI,uBAAA,IAAI,+BAAO,CAAC,SAAS,KAAK,uBAAA,IAAI,yCAAiB,EAAE;QACpE,uBAAA,IAAI,+DAAuC,MAA3C,IAAI,CAAyC,CAAC;KAC/C;IAED,SAAS,cAAc,CACrB,KAAY,EACZ,iBAA2C;QAE3C,KAAK,MAAM,KAAK,IAAI,iBAAiB,EAAE;YACrC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACtC,OAAO,KAAK,CAAC;aACd;SACF;QACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;YACvC,IACE,KAAK,CAAC,kBAAkB;gBACxB,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,EACzC;gBACA,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -11,14 +11,14 @@ var _NetworkEventManager_requestWillBeSentMap, _NetworkEventManager_requestPause
11
11
  */
12
12
  export class NetworkEventManager {
13
13
  constructor() {
14
- /*
14
+ /**
15
15
  * There are four possible orders of events:
16
- * A. `_onRequestWillBeSent`
17
- * B. `_onRequestWillBeSent`, `_onRequestPaused`
18
- * C. `_onRequestPaused`, `_onRequestWillBeSent`
19
- * D. `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
20
- * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`
21
- * (see crbug.com/1196004)
16
+ * A. `_onRequestWillBeSent`
17
+ * B. `_onRequestWillBeSent`, `_onRequestPaused`
18
+ * C. `_onRequestPaused`, `_onRequestWillBeSent`
19
+ * D. `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
20
+ * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`
21
+ * (see crbug.com/1196004)
22
22
  *
23
23
  * For `_onRequest` we need the event from `_onRequestWillBeSent` and
24
24
  * optionally the `interceptionId` from `_onRequestPaused`.
@@ -32,16 +32,16 @@ export class NetworkEventManager {
32
32
  *
33
33
  * Note that (chains of) redirect requests have the same `requestId` (!) as
34
34
  * the original request. We have to anticipate series of events like these:
35
- * A. `_onRequestWillBeSent`,
36
- * `_onRequestWillBeSent`, ...
37
- * B. `_onRequestWillBeSent`, `_onRequestPaused`,
38
- * `_onRequestWillBeSent`, `_onRequestPaused`, ...
39
- * C. `_onRequestWillBeSent`, `_onRequestPaused`,
40
- * `_onRequestPaused`, `_onRequestWillBeSent`, ...
41
- * D. `_onRequestPaused`, `_onRequestWillBeSent`,
42
- * `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
43
- * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`, ...
44
- * (see crbug.com/1196004)
35
+ * A. `_onRequestWillBeSent`,
36
+ * `_onRequestWillBeSent`, ...
37
+ * B. `_onRequestWillBeSent`, `_onRequestPaused`,
38
+ * `_onRequestWillBeSent`, `_onRequestPaused`, ...
39
+ * C. `_onRequestWillBeSent`, `_onRequestPaused`,
40
+ * `_onRequestPaused`, `_onRequestWillBeSent`, ...
41
+ * D. `_onRequestPaused`, `_onRequestWillBeSent`,
42
+ * `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
43
+ * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`, ...
44
+ * (see crbug.com/1196004)
45
45
  */
46
46
  _NetworkEventManager_requestWillBeSentMap.set(this, new Map());
47
47
  _NetworkEventManager_requestPausedMap.set(this, new Map());