chrome-devtools-frontend 1.0.1036501 → 1.0.1038113
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.
- package/config/gni/devtools_grd_files.gni +9 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +21 -5
- package/front_end/core/sdk/NetworkRequest.ts +10 -0
- package/front_end/entrypoints/main/MainImpl.ts +2 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +3 -3
- package/front_end/panels/elements/TopLayerContainer.ts +14 -13
- package/front_end/panels/media/PlayerPropertiesView.ts +43 -11
- package/front_end/panels/media/playerPropertiesView.css +22 -3
- package/front_end/panels/sources/NavigatorView.ts +12 -3
- package/front_end/panels/sources/components/BreakpointsView.ts +11 -16
- package/front_end/panels/sources/components/breakpointsView.css +21 -13
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +244 -244
- package/front_end/third_party/lighthouse/locales/en-US.json +2 -2
- package/front_end/third_party/lighthouse/locales/en-XL.json +2 -2
- package/front_end/third_party/puppeteer/package/README.md +20 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +10 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +19 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +23 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js +35 -20
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +19 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +5 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts +168 -131
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +208 -206
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +74 -75
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +82 -97
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +16 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js +17 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts +634 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js +713 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Frame.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +9 -679
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +77 -803
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +11 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +11 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +34 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +35 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DOMWorld.d.ts → IsolatedWorld.d.ts} +58 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{DOMWorld.js → IsolatedWorld.js} +124 -151
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/IsolatedWorld.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +40 -58
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +53 -76
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +23 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +17 -17
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +8 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +395 -296
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +398 -313
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +14 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +14 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +38 -17
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +49 -31
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +7 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +8 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js +8 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +1 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +5 -53
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js +148 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/Poller.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js +78 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/DeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/ErrorLike.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{common → util}/assert.d.ts +0 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/assert.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{common → util}/assert.js +0 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/assert.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/getPackageDirectory.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +10 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +19 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +23 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js +36 -21
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +19 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +5 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts +168 -131
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +208 -206
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +74 -75
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +83 -98
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +16 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +17 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts +634 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js +709 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Frame.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +9 -679
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +72 -797
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +11 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +11 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +34 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +35 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DOMWorld.d.ts → IsolatedWorld.d.ts} +58 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{DOMWorld.js → IsolatedWorld.js} +123 -150
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/IsolatedWorld.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +40 -58
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +54 -77
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +24 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +17 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +8 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +395 -296
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +398 -313
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +14 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +14 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +38 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +49 -31
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +7 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +8 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +8 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +1 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +3 -48
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts +28 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js +142 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/Poller.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js +73 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/DeferredPromise.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/ErrorLike.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{common → util}/assert.d.ts +0 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/assert.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{common → util}/assert.js +0 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/assert.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/getPackageDirectory.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +1069 -878
- package/front_end/third_party/puppeteer/package/package.json +32 -28
- package/front_end/third_party/puppeteer/package/typescript-if-required.js +1 -1
- package/front_end/third_party/puppeteer/puppeteer.ts +1 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +0 -1
- 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 {
|
18
|
+
import type { ElementHandle } from './ElementHandle.js';
|
19
19
|
import { ExecutionContext } from './ExecutionContext.js';
|
20
20
|
import { MouseButton } from './Input.js';
|
21
|
-
import
|
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
|
49
|
-
* {@link Page.evaluateHandle
|
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
|
77
|
+
get client(): CDPSession;
|
75
78
|
/**
|
76
79
|
* @internal
|
77
80
|
*/
|
78
|
-
get
|
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
|
-
/**
|
86
|
+
/**
|
87
|
+
* @returns The execution context the handle belongs to.
|
92
88
|
*/
|
93
89
|
executionContext(): ExecutionContext;
|
94
90
|
/**
|
95
|
-
*
|
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
|
-
* @
|
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
|
-
*
|
111
|
-
*
|
112
|
-
* @remarks
|
100
|
+
* Evaluates the given function with the current handle as its first argument.
|
113
101
|
*
|
114
|
-
*
|
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
|
-
*
|
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
|
153
|
-
*
|
154
|
-
* @
|
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
|
-
*
|
157
|
-
*
|
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
|
140
|
+
jsonValue(): Promise<T>;
|
161
141
|
/**
|
162
|
-
* @returns Either `null` or the
|
163
|
-
*
|
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
|
-
*
|
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
|
153
|
+
* @remarks
|
154
|
+
* Useful during debugging.
|
175
155
|
*/
|
176
156
|
toString(): string;
|
177
157
|
/**
|
178
|
-
* Provides access to
|
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,
|
1
|
+
{"version":3,"file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C,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 '
|
29
|
-
import { releaseObject, valueFromRemoteObject
|
28
|
+
import { assert } from '../util/assert.js';
|
29
|
+
import { createJSHandle, releaseObject, valueFromRemoteObject } from './util.js';
|
30
30
|
/**
|
31
|
-
* Represents
|
32
|
-
* {@link Page.evaluateHandle
|
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
|
67
|
+
get client() {
|
65
68
|
return __classPrivateFieldGet(this, _JSHandle_client, "f");
|
66
69
|
}
|
67
70
|
/**
|
68
71
|
* @internal
|
69
72
|
*/
|
70
|
-
get
|
73
|
+
get disposed() {
|
71
74
|
return __classPrivateFieldGet(this, _JSHandle_disposed, "f");
|
72
75
|
}
|
73
76
|
/**
|
74
|
-
* @
|
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
|
-
*
|
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
|
-
* @
|
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
|
-
*
|
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
|
-
*
|
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
|
99
|
+
return this.evaluateHandle((object, propertyName) => {
|
124
100
|
return object[propertyName];
|
125
101
|
}, propertyName);
|
126
102
|
}
|
127
103
|
/**
|
128
|
-
*
|
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
|
161
|
-
*
|
162
|
-
* @
|
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
|
-
*
|
165
|
-
*
|
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
|
-
|
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
|
-
|
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
|
182
|
-
*
|
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
|
-
*
|
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
|
178
|
+
* @remarks
|
179
|
+
* Useful during debugging.
|
205
180
|
*/
|
206
181
|
toString() {
|
207
|
-
if (__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
208
|
-
|
209
|
-
return 'JSHandle@' + type;
|
182
|
+
if (!__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
183
|
+
return 'JSHandle:' + valueFromRemoteObject(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
|
210
184
|
}
|
211
|
-
|
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
|
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_remoteObject, "f");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"JSHandle.js","sourceRoot":"","sources":["../../../../src/common/JSHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,
|
1
|
+
{"version":3,"file":"JSHandle.js","sourceRoot":"","sources":["../../../../src/common/JSHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAMzC,OAAO,EAAC,cAAc,EAAE,aAAa,EAAE,qBAAqB,EAAC,MAAM,WAAW,CAAC;AA8B/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,QAAQ;IAyBnB;;OAEG;IACH,YACE,OAAyB,EACzB,MAAkB,EAClB,YAA2C;QAzB7C,mCAAoB;QACpB,6BAAY,KAAK,EAAC;QAClB,oCAA2B;QAC3B,yCAA6C;QAwB3C,uBAAA,IAAI,qBAAY,OAAO,MAAA,CAAC;QACxB,uBAAA,IAAI,oBAAW,MAAM,MAAA,CAAC;QACtB,uBAAA,IAAI,0BAAiB,YAAY,MAAA,CAAC;IACpC,CAAC;IAzBD;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,uBAAA,IAAI,wBAAQ,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,uBAAA,IAAI,0BAAU,CAAC;IACxB,CAAC;IAeD;;OAEG;IACH,gBAAgB;QACd,OAAO,uBAAA,IAAI,yBAAS,CAAC;IAC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+14,8 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { TimeoutError } from './Errors.js';
|
17
|
-
import { FrameManager
|
17
|
+
import { FrameManager } from './FrameManager.js';
|
18
|
+
import { Frame } from './Frame.js';
|
18
19
|
import { HTTPResponse } from './HTTPResponse.js';
|
19
20
|
/**
|
20
21
|
* @public
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LifecycleWatcher.d.ts","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"LifecycleWatcher.d.ts","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEjC,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;;gBAwCzB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,uBAAuB,GAAG,uBAAuB,EAAE,EAC9D,OAAO,EAAE,MAAM;IAmGX,kBAAkB,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAUxD,6BAA6B,IAAI,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;IAI3D,4BAA4B,IAAI,OAAO,CAAC,KAAK,GAAG,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"}
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js
CHANGED
@@ -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 '
|
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
|
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.
|
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
|
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
|
-
|
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'));
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LifecycleWatcher.js","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,
|
1
|
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A5B,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"}
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js
CHANGED
@@ -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
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
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
|
-
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
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());
|