chrome-devtools-frontend 1.0.1037221 → 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/panels/sources/NavigatorView.ts +4 -0
- 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/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":"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,KAAK,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AACvC,OAAO,EAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAG7D,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,MAAM,C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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"}
|
@@ -28,24 +28,27 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
28
28
|
var _JSHandle_client, _JSHandle_disposed, _JSHandle_context, _JSHandle_remoteObject;
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
30
30
|
exports.JSHandle = void 0;
|
31
|
-
const assert_js_1 = require("
|
31
|
+
const assert_js_1 = require("../util/assert.js");
|
32
32
|
const util_js_1 = require("./util.js");
|
33
33
|
/**
|
34
|
-
* Represents
|
35
|
-
* {@link Page.evaluateHandle
|
34
|
+
* Represents a reference to a JavaScript object. Instances can be created using
|
35
|
+
* {@link Page.evaluateHandle}.
|
36
|
+
*
|
37
|
+
* Handles prevent the referenced JavaScript object from being garbage-collected
|
38
|
+
* unless the handle is purposely {@link JSHandle.dispose | disposed}. JSHandles
|
39
|
+
* are auto-disposed when their associated frame is navigated away or the parent
|
40
|
+
* context gets destroyed.
|
41
|
+
*
|
42
|
+
* Handles can be used as arguments for any evaluation function such as
|
43
|
+
* {@link Page.$eval}, {@link Page.evaluate}, and {@link Page.evaluateHandle}.
|
44
|
+
* They are resolved to their referenced object.
|
36
45
|
*
|
37
46
|
* @example
|
47
|
+
*
|
38
48
|
* ```ts
|
39
49
|
* const windowHandle = await page.evaluateHandle(() => window);
|
40
50
|
* ```
|
41
51
|
*
|
42
|
-
* JSHandle prevents the referenced JavaScript object from being garbage-collected
|
43
|
-
* unless the handle is {@link JSHandle.dispose | disposed}. JSHandles are auto-
|
44
|
-
* disposed when their origin frame gets navigated or the parent context gets destroyed.
|
45
|
-
*
|
46
|
-
* JSHandle instances can be used as arguments for {@link Page.$eval},
|
47
|
-
* {@link Page.evaluate}, and {@link Page.evaluateHandle}.
|
48
|
-
*
|
49
52
|
* @public
|
50
53
|
*/
|
51
54
|
class JSHandle {
|
@@ -64,88 +67,64 @@ class JSHandle {
|
|
64
67
|
/**
|
65
68
|
* @internal
|
66
69
|
*/
|
67
|
-
get
|
70
|
+
get client() {
|
68
71
|
return __classPrivateFieldGet(this, _JSHandle_client, "f");
|
69
72
|
}
|
70
73
|
/**
|
71
74
|
* @internal
|
72
75
|
*/
|
73
|
-
get
|
76
|
+
get disposed() {
|
74
77
|
return __classPrivateFieldGet(this, _JSHandle_disposed, "f");
|
75
78
|
}
|
76
79
|
/**
|
77
|
-
* @
|
78
|
-
*/
|
79
|
-
get _remoteObject() {
|
80
|
-
return __classPrivateFieldGet(this, _JSHandle_remoteObject, "f");
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* @internal
|
84
|
-
*/
|
85
|
-
get _context() {
|
86
|
-
return __classPrivateFieldGet(this, _JSHandle_context, "f");
|
87
|
-
}
|
88
|
-
/** Returns the execution context the handle belongs to.
|
80
|
+
* @returns The execution context the handle belongs to.
|
89
81
|
*/
|
90
82
|
executionContext() {
|
91
83
|
return __classPrivateFieldGet(this, _JSHandle_context, "f");
|
92
84
|
}
|
93
85
|
/**
|
94
|
-
*
|
95
|
-
* `pageFunction` returns a Promise, then `handle.evaluate` would wait for the
|
96
|
-
* promise to resolve and return its value.
|
86
|
+
* Evaluates the given function with the current handle as its first argument.
|
97
87
|
*
|
98
|
-
* @
|
99
|
-
* ```ts
|
100
|
-
* const tweetHandle = await page.$('.tweet .retweets');
|
101
|
-
* expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10');
|
102
|
-
* ```
|
88
|
+
* @see {@link ExecutionContext.evaluate} for more details.
|
103
89
|
*/
|
104
90
|
async evaluate(pageFunction, ...args) {
|
105
91
|
return await this.executionContext().evaluate(pageFunction, this, ...args);
|
106
92
|
}
|
107
93
|
/**
|
108
|
-
*
|
109
|
-
*
|
110
|
-
* @remarks
|
111
|
-
*
|
112
|
-
* The only difference between `jsHandle.evaluate` and
|
113
|
-
* `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle` returns an
|
114
|
-
* in-page object (JSHandle).
|
115
|
-
*
|
116
|
-
* If the function passed to `jsHandle.evaluateHandle` returns a Promise, then
|
117
|
-
* `evaluateHandle.evaluateHandle` waits for the promise to resolve and
|
118
|
-
* returns its value.
|
94
|
+
* Evaluates the given function with the current handle as its first argument.
|
119
95
|
*
|
120
|
-
*
|
96
|
+
* @see {@link ExecutionContext.evaluateHandle} for more details.
|
121
97
|
*/
|
122
98
|
async evaluateHandle(pageFunction, ...args) {
|
123
99
|
return await this.executionContext().evaluateHandle(pageFunction, this, ...args);
|
124
100
|
}
|
125
101
|
async getProperty(propertyName) {
|
126
|
-
return
|
102
|
+
return this.evaluateHandle((object, propertyName) => {
|
127
103
|
return object[propertyName];
|
128
104
|
}, propertyName);
|
129
105
|
}
|
130
106
|
/**
|
131
|
-
*
|
132
|
-
* for the property values.
|
107
|
+
* Gets a map of handles representing the properties of the current handle.
|
133
108
|
*
|
134
109
|
* @example
|
110
|
+
*
|
135
111
|
* ```ts
|
136
112
|
* const listHandle = await page.evaluateHandle(() => document.body.children);
|
137
113
|
* const properties = await listHandle.getProperties();
|
138
114
|
* const children = [];
|
139
115
|
* for (const property of properties.values()) {
|
140
116
|
* const element = property.asElement();
|
141
|
-
* if (element)
|
117
|
+
* if (element) {
|
142
118
|
* children.push(element);
|
119
|
+
* }
|
143
120
|
* }
|
144
121
|
* children; // holds elementHandles to all children of document.body
|
145
122
|
* ```
|
146
123
|
*/
|
147
124
|
async getProperties() {
|
148
125
|
(0, assert_js_1.assert)(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId);
|
126
|
+
// We use Runtime.getProperties rather than iterative building because the
|
127
|
+
// iterative approach might create a distorted snapshot.
|
149
128
|
const response = await __classPrivateFieldGet(this, _JSHandle_client, "f").send('Runtime.getProperties', {
|
150
129
|
objectId: __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId,
|
151
130
|
ownProperties: true,
|
@@ -160,39 +139,34 @@ class JSHandle {
|
|
160
139
|
return result;
|
161
140
|
}
|
162
141
|
/**
|
163
|
-
* @returns
|
164
|
-
*
|
165
|
-
* @
|
142
|
+
* @returns A vanilla object representing the serializable portions of the
|
143
|
+
* referenced object.
|
144
|
+
* @throws Throws if the object cannot be serialized due to circularity.
|
166
145
|
*
|
167
|
-
*
|
168
|
-
*
|
169
|
-
* **NOTE** The method throws if the referenced object is not stringifiable.
|
146
|
+
* @remarks
|
147
|
+
* If the object has a `toJSON` function, it **will not** be called.
|
170
148
|
*/
|
171
149
|
async jsonValue() {
|
172
|
-
if (__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
173
|
-
|
174
|
-
functionDeclaration: 'function() { return this; }',
|
175
|
-
objectId: __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId,
|
176
|
-
returnByValue: true,
|
177
|
-
awaitPromise: true,
|
178
|
-
});
|
179
|
-
return (0, util_js_1.valueFromRemoteObject)(response.result);
|
150
|
+
if (!__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
151
|
+
return (0, util_js_1.valueFromRemoteObject)(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
|
180
152
|
}
|
181
|
-
|
153
|
+
const value = await this.evaluate(object => {
|
154
|
+
return object;
|
155
|
+
});
|
156
|
+
if (value === undefined) {
|
157
|
+
throw new Error('Could not serialize referenced object');
|
158
|
+
}
|
159
|
+
return value;
|
182
160
|
}
|
183
161
|
/**
|
184
|
-
* @returns Either `null` or the
|
185
|
-
*
|
162
|
+
* @returns Either `null` or the handle itself if the handle is an
|
163
|
+
* instance of {@link ElementHandle}.
|
186
164
|
*/
|
187
165
|
asElement() {
|
188
|
-
/* This always returns null, but subclasses can override this and return an
|
189
|
-
ElementHandle.
|
190
|
-
*/
|
191
166
|
return null;
|
192
167
|
}
|
193
168
|
/**
|
194
|
-
*
|
195
|
-
* successfully disposed of.
|
169
|
+
* Releases the object referenced by the handle for garbage collection.
|
196
170
|
*/
|
197
171
|
async dispose() {
|
198
172
|
if (__classPrivateFieldGet(this, _JSHandle_disposed, "f")) {
|
@@ -204,17 +178,20 @@ class JSHandle {
|
|
204
178
|
/**
|
205
179
|
* Returns a string representation of the JSHandle.
|
206
180
|
*
|
207
|
-
* @remarks
|
181
|
+
* @remarks
|
182
|
+
* Useful during debugging.
|
208
183
|
*/
|
209
184
|
toString() {
|
210
|
-
if (__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
211
|
-
|
212
|
-
return 'JSHandle@' + type;
|
185
|
+
if (!__classPrivateFieldGet(this, _JSHandle_remoteObject, "f").objectId) {
|
186
|
+
return 'JSHandle:' + (0, util_js_1.valueFromRemoteObject)(__classPrivateFieldGet(this, _JSHandle_remoteObject, "f"));
|
213
187
|
}
|
214
|
-
|
188
|
+
const type = __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").subtype || __classPrivateFieldGet(this, _JSHandle_remoteObject, "f").type;
|
189
|
+
return 'JSHandle@' + type;
|
215
190
|
}
|
216
191
|
/**
|
217
|
-
* Provides access to
|
192
|
+
* Provides access to the
|
193
|
+
* [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject)
|
194
|
+
* backing this handle.
|
218
195
|
*/
|
219
196
|
remoteObject() {
|
220
197
|
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,
|
1
|
+
{"version":3,"file":"JSHandle.js","sourceRoot":"","sources":["../../../../src/common/JSHandle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAc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U,EAAE;YAClB,OAAO;SACR;QACD,uBAAA,IAAI,sBAAa,IAAI,MAAA,CAAC;QACtB,MAAM,IAAA,uBAAa,EAAC,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,IAAA,+BAAqB,EAAC,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;AAxMD,4BAwMC"}
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts
CHANGED
@@ -14,7 +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/cjs/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/cjs/puppeteer/common/LifecycleWatcher.js
CHANGED
@@ -25,11 +25,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
25
25
|
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");
|
26
26
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
27
27
|
};
|
28
|
-
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
|
+
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;
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
30
30
|
exports.LifecycleWatcher = void 0;
|
31
|
-
const assert_js_1 = require("
|
31
|
+
const assert_js_1 = require("../util/assert.js");
|
32
32
|
const util_js_1 = require("./util.js");
|
33
|
+
const DeferredPromise_js_1 = require("../util/DeferredPromise.js");
|
33
34
|
const Errors_js_1 = require("./Errors.js");
|
34
35
|
const FrameManager_js_1 = require("./FrameManager.js");
|
35
36
|
const NetworkManager_js_1 = require("./NetworkManager.js");
|
@@ -74,6 +75,7 @@ class LifecycleWatcher {
|
|
74
75
|
_LifecycleWatcher_maximumTimer.set(this, void 0);
|
75
76
|
_LifecycleWatcher_hasSameDocumentNavigation.set(this, void 0);
|
76
77
|
_LifecycleWatcher_swapped.set(this, void 0);
|
78
|
+
_LifecycleWatcher_navigationResponseReceived.set(this, void 0);
|
77
79
|
if (Array.isArray(waitUntil)) {
|
78
80
|
waitUntil = waitUntil.slice();
|
79
81
|
}
|
@@ -90,19 +92,22 @@ class LifecycleWatcher {
|
|
90
92
|
__classPrivateFieldSet(this, _LifecycleWatcher_frame, frame, "f");
|
91
93
|
__classPrivateFieldSet(this, _LifecycleWatcher_timeout, timeout, "f");
|
92
94
|
__classPrivateFieldSet(this, _LifecycleWatcher_eventListeners, [
|
93
|
-
(0, util_js_1.addEventListener)(frameManager.
|
95
|
+
(0, util_js_1.addEventListener)(frameManager.client, Connection_js_1.CDPSessionEmittedEvents.Disconnected, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_terminate).bind(this, new Error('Navigation failed because browser has disconnected!'))),
|
94
96
|
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.LifecycleEvent, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).bind(this)),
|
95
97
|
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigatedWithinDocument, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigatedWithinDocument).bind(this)),
|
96
98
|
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigated, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigated).bind(this)),
|
97
99
|
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameSwapped, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_frameSwapped).bind(this)),
|
98
100
|
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameDetached, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onFrameDetached).bind(this)),
|
99
|
-
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager
|
101
|
+
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Request, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onRequest).bind(this)),
|
102
|
+
(0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Response, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onResponse).bind(this)),
|
100
103
|
], "f");
|
101
104
|
__classPrivateFieldSet(this, _LifecycleWatcher_timeoutPromise, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_createTimeoutPromise).call(this), "f");
|
102
105
|
__classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this);
|
103
106
|
}
|
104
107
|
async navigationResponse() {
|
105
|
-
|
108
|
+
var _a;
|
109
|
+
// Continue with a possibly null response.
|
110
|
+
await ((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.catch(() => { }));
|
106
111
|
return __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f") ? __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f").response() : null;
|
107
112
|
}
|
108
113
|
sameDocumentNavigationPromise() {
|
@@ -123,11 +128,23 @@ class LifecycleWatcher {
|
|
123
128
|
}
|
124
129
|
}
|
125
130
|
exports.LifecycleWatcher = LifecycleWatcher;
|
126
|
-
_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) {
|
131
|
+
_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) {
|
132
|
+
var _a, _b;
|
127
133
|
if (request.frame() !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") || !request.isNavigationRequest()) {
|
128
134
|
return;
|
129
135
|
}
|
130
136
|
__classPrivateFieldSet(this, _LifecycleWatcher_navigationRequest, request, "f");
|
137
|
+
(_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.reject(new Error('New navigation request was received'));
|
138
|
+
__classPrivateFieldSet(this, _LifecycleWatcher_navigationResponseReceived, (0, DeferredPromise_js_1.createDeferredPromise)(), "f");
|
139
|
+
if (request.response() !== null) {
|
140
|
+
(_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve();
|
141
|
+
}
|
142
|
+
}, _LifecycleWatcher_onResponse = function _LifecycleWatcher_onResponse(response) {
|
143
|
+
var _a, _b;
|
144
|
+
if (((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f")) === null || _a === void 0 ? void 0 : _a._requestId) !== response.request()._requestId) {
|
145
|
+
return;
|
146
|
+
}
|
147
|
+
(_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve();
|
131
148
|
}, _LifecycleWatcher_onFrameDetached = function _LifecycleWatcher_onFrameDetached(frame) {
|
132
149
|
if (__classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") === frame) {
|
133
150
|
__classPrivateFieldGet(this, _LifecycleWatcher_terminationCallback, "f").call(null, new Error('Navigating frame was detached'));
|
package/front_end/third_party/puppeteer/package/lib/cjs/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,
|
1
|
+
{"version":3,"file":"LifecycleWatcher.js","sourceRoot":"","sources":["../../../../src/common/LifecycleWatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;AAEH,iDAAyC;AACzC,uCAImB;AACnB,mEAGoC;AACpC,2CAAyC;AACzC,uDAA0E;AAI1E,2DAAgE;AAChE,mDAAwD;AAmBxD,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAG1C;IACA,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACxC,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,cAAc,EAAE,mBAAmB,CAAC;CACtC,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG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;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/cjs/puppeteer/common/NetworkEventManager.js
CHANGED
@@ -14,14 +14,14 @@ exports.NetworkEventManager = void 0;
|
|
14
14
|
*/
|
15
15
|
class NetworkEventManager {
|
16
16
|
constructor() {
|
17
|
-
|
17
|
+
/**
|
18
18
|
* There are four possible orders of events:
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
19
|
+
* A. `_onRequestWillBeSent`
|
20
|
+
* B. `_onRequestWillBeSent`, `_onRequestPaused`
|
21
|
+
* C. `_onRequestPaused`, `_onRequestWillBeSent`
|
22
|
+
* D. `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
|
23
|
+
* `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`
|
24
|
+
* (see crbug.com/1196004)
|
25
25
|
*
|
26
26
|
* For `_onRequest` we need the event from `_onRequestWillBeSent` and
|
27
27
|
* optionally the `interceptionId` from `_onRequestPaused`.
|
@@ -35,16 +35,16 @@ class NetworkEventManager {
|
|
35
35
|
*
|
36
36
|
* Note that (chains of) redirect requests have the same `requestId` (!) as
|
37
37
|
* the original request. We have to anticipate series of events like these:
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
38
|
+
* A. `_onRequestWillBeSent`,
|
39
|
+
* `_onRequestWillBeSent`, ...
|
40
|
+
* B. `_onRequestWillBeSent`, `_onRequestPaused`,
|
41
|
+
* `_onRequestWillBeSent`, `_onRequestPaused`, ...
|
42
|
+
* C. `_onRequestWillBeSent`, `_onRequestPaused`,
|
43
|
+
* `_onRequestPaused`, `_onRequestWillBeSent`, ...
|
44
|
+
* D. `_onRequestPaused`, `_onRequestWillBeSent`,
|
45
|
+
* `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,
|
46
|
+
* `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`, ...
|
47
|
+
* (see crbug.com/1196004)
|
48
48
|
*/
|
49
49
|
_NetworkEventManager_requestWillBeSentMap.set(this, new Map());
|
50
50
|
_NetworkEventManager_requestPausedMap.set(this, new Map());
|