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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/common/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAa,SAAQ,WAAW;CAAG;AAEhD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,WAAW;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,SAAM;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC;AAED
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/common/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAa,SAAQ,WAAW;CAAG;AAEhD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,WAAW;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,SAAM;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM,EAAE,eAGnB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/common/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;CAAG;AAEhD;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QAES,oBAAe,GAAG,EAAE,CAAC;IAC9B,CAAC;CAAA;AAUD
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/common/Errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;CAAG;AAEhD;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QAES,oBAAe,GAAG,EAAE,CAAC;IAC9B,CAAC;CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB,MAAM,CAAC,MAAM,CAAC;IACnD,YAAY;IACZ,aAAa;CACd,CAAC,CAAC"}
|
@@ -38,14 +38,14 @@ export declare class EventEmitter implements CommonEventEmitter {
|
|
38
38
|
/**
|
39
39
|
* Bind an event listener to fire when an event occurs.
|
40
40
|
* @param event - the event type you'd like to listen to. Can be a string or symbol.
|
41
|
-
* @param handler
|
41
|
+
* @param handler - the function to be called when the event occurs.
|
42
42
|
* @returns `this` to enable you to chain method calls.
|
43
43
|
*/
|
44
44
|
on(event: EventType, handler: Handler): EventEmitter;
|
45
45
|
/**
|
46
46
|
* Remove an event listener from firing.
|
47
47
|
* @param event - the event type you'd like to stop listening to.
|
48
|
-
* @param handler
|
48
|
+
* @param handler - the function that should be removed.
|
49
49
|
* @returns `this` to enable you to chain method calls.
|
50
50
|
*/
|
51
51
|
off(event: EventType, handler: Handler): EventEmitter;
|
@@ -22,7 +22,7 @@ export class EventEmitter {
|
|
22
22
|
/**
|
23
23
|
* Bind an event listener to fire when an event occurs.
|
24
24
|
* @param event - the event type you'd like to listen to. Can be a string or symbol.
|
25
|
-
* @param handler
|
25
|
+
* @param handler - the function to be called when the event occurs.
|
26
26
|
* @returns `this` to enable you to chain method calls.
|
27
27
|
*/
|
28
28
|
on(event, handler) {
|
@@ -32,7 +32,7 @@ export class EventEmitter {
|
|
32
32
|
/**
|
33
33
|
* Remove an event listener from firing.
|
34
34
|
* @param event - the event type you'd like to stop listening to.
|
35
|
-
* @param handler
|
35
|
+
* @param handler - the function that should be removed.
|
36
36
|
* @returns `this` to enable you to chain method calls.
|
37
37
|
*/
|
38
38
|
off(event, handler) {
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts
CHANGED
@@ -15,9 +15,8 @@
|
|
15
15
|
*/
|
16
16
|
import { Protocol } from 'devtools-protocol';
|
17
17
|
import { CDPSession } from './Connection.js';
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import { Frame } from './FrameManager.js';
|
18
|
+
import { Frame } from './Frame.js';
|
19
|
+
import { IsolatedWorld } from './IsolatedWorld.js';
|
21
20
|
import { JSHandle } from './JSHandle.js';
|
22
21
|
import { EvaluateFunc, HandleFor } from './types.js';
|
23
22
|
/**
|
@@ -25,21 +24,26 @@ import { EvaluateFunc, HandleFor } from './types.js';
|
|
25
24
|
*/
|
26
25
|
export declare const EVALUATION_SCRIPT_URL = "pptr://__puppeteer_evaluation_script__";
|
27
26
|
/**
|
28
|
-
*
|
29
|
-
* many execution contexts:
|
30
|
-
* - each
|
31
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe |
|
32
|
-
* frame } has "default" execution context that is always created after frame is
|
33
|
-
* attached to DOM. This context is returned by the
|
34
|
-
* {@link Frame.executionContext} method.
|
35
|
-
* - {@link https://developer.chrome.com/extensions | Extension}'s content scripts
|
36
|
-
* create additional execution contexts.
|
27
|
+
* @deprecated Do not use directly.
|
37
28
|
*
|
38
|
-
*
|
39
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API |
|
40
|
-
* workers }.
|
29
|
+
* Represents a context for JavaScript execution.
|
41
30
|
*
|
42
|
-
* @
|
31
|
+
* @example
|
32
|
+
* A {@link Page} can have several execution contexts:
|
33
|
+
*
|
34
|
+
* - Each {@link Frame} of a {@link Page | page} has a "default" execution
|
35
|
+
* context that is always created after frame is attached to DOM. This context
|
36
|
+
* is returned by the {@link Frame.executionContext} method.
|
37
|
+
* - Each {@link https://developer.chrome.com/extensions | Chrome extensions}
|
38
|
+
* creates additional execution contexts to isolate their code.
|
39
|
+
*
|
40
|
+
* @remarks
|
41
|
+
* By definition, each context is isolated from one another, however they are
|
42
|
+
* all able to manipulate non-JavaScript resources (such as DOM).
|
43
|
+
*
|
44
|
+
* @remarks
|
45
|
+
* Besides pages, execution contexts can be found in
|
46
|
+
* {@link WebWorker | workers}.
|
43
47
|
*/
|
44
48
|
export declare class ExecutionContext {
|
45
49
|
#private;
|
@@ -50,7 +54,7 @@ export declare class ExecutionContext {
|
|
50
54
|
/**
|
51
55
|
* @internal
|
52
56
|
*/
|
53
|
-
_world?:
|
57
|
+
_world?: IsolatedWorld;
|
54
58
|
/**
|
55
59
|
* @internal
|
56
60
|
*/
|
@@ -62,29 +66,21 @@ export declare class ExecutionContext {
|
|
62
66
|
/**
|
63
67
|
* @internal
|
64
68
|
*/
|
65
|
-
constructor(client: CDPSession, contextPayload: Protocol.Runtime.ExecutionContextDescription, world?:
|
69
|
+
constructor(client: CDPSession, contextPayload: Protocol.Runtime.ExecutionContextDescription, world?: IsolatedWorld);
|
66
70
|
/**
|
67
|
-
* @remarks
|
68
|
-
*
|
69
|
-
* Not every execution context is associated with a frame. For
|
70
|
-
* example, workers and extensions have execution contexts that are not
|
71
|
-
* associated with frames.
|
72
|
-
*
|
73
71
|
* @returns The frame associated with this execution context.
|
72
|
+
*
|
73
|
+
* @remarks
|
74
|
+
* Not every execution context is associated with a frame. For example,
|
75
|
+
* {@link WebWorker | workers} have execution contexts that are not associated
|
76
|
+
* with frames.
|
74
77
|
*/
|
75
78
|
frame(): Frame | null;
|
76
79
|
/**
|
77
|
-
*
|
78
|
-
* If the function passed to the `executionContext.evaluate` returns a
|
79
|
-
* Promise, then `executionContext.evaluate` would wait for the promise to
|
80
|
-
* resolve and return its value. If the function passed to the
|
81
|
-
* `executionContext.evaluate` returns a non-serializable value, then
|
82
|
-
* `executionContext.evaluate` resolves to `undefined`. DevTools Protocol also
|
83
|
-
* supports transferring some additional values that are not serializable by
|
84
|
-
* `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
|
85
|
-
*
|
80
|
+
* Evaluates the given function.
|
86
81
|
*
|
87
82
|
* @example
|
83
|
+
*
|
88
84
|
* ```ts
|
89
85
|
* const executionContext = await page.mainFrame().executionContext();
|
90
86
|
* const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ;
|
@@ -92,82 +88,94 @@ export declare class ExecutionContext {
|
|
92
88
|
* ```
|
93
89
|
*
|
94
90
|
* @example
|
95
|
-
* A string can also be passed in instead of a function
|
91
|
+
* A string can also be passed in instead of a function:
|
96
92
|
*
|
97
93
|
* ```ts
|
98
94
|
* console.log(await executionContext.evaluate('1 + 2')); // prints "3"
|
99
95
|
* ```
|
100
96
|
*
|
101
97
|
* @example
|
102
|
-
*
|
103
|
-
*
|
98
|
+
* Handles can also be passed as `args`. They resolve to their referenced object:
|
99
|
+
*
|
104
100
|
* ```ts
|
105
101
|
* const oneHandle = await executionContext.evaluateHandle(() => 1);
|
106
102
|
* const twoHandle = await executionContext.evaluateHandle(() => 2);
|
107
103
|
* const result = await executionContext.evaluate(
|
108
|
-
*
|
104
|
+
* (a, b) => a + b,
|
105
|
+
* oneHandle,
|
106
|
+
* twoHandle
|
109
107
|
* );
|
110
108
|
* await oneHandle.dispose();
|
111
109
|
* await twoHandle.dispose();
|
112
110
|
* console.log(result); // prints '3'.
|
113
111
|
* ```
|
114
|
-
* @param pageFunction - a function to be evaluated in the `executionContext`
|
115
|
-
* @param args - argument to pass to the page function
|
116
112
|
*
|
117
|
-
* @
|
113
|
+
* @param pageFunction - The function to evaluate.
|
114
|
+
* @param args - Additional arguments to pass into the function.
|
115
|
+
* @returns The result of evaluating the function. If the result is an object,
|
116
|
+
* a vanilla object containing the serializable properties of the result is
|
117
|
+
* returned.
|
118
118
|
*/
|
119
119
|
evaluate<Params extends unknown[], Func extends EvaluateFunc<Params> = EvaluateFunc<Params>>(pageFunction: Func | string, ...args: Params): Promise<Awaited<ReturnType<Func>>>;
|
120
120
|
/**
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
124
|
-
*
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
121
|
+
* Evaluates the given function.
|
122
|
+
*
|
123
|
+
* Unlike {@link ExecutionContext.evaluate | evaluate}, this method returns a
|
124
|
+
* handle to the result of the function.
|
125
|
+
*
|
126
|
+
* This method may be better suited if the object cannot be serialized (e.g.
|
127
|
+
* `Map`) and requires further manipulation.
|
128
128
|
*
|
129
129
|
* @example
|
130
|
+
*
|
130
131
|
* ```ts
|
131
132
|
* const context = await page.mainFrame().executionContext();
|
132
|
-
* const
|
133
|
-
*
|
133
|
+
* const handle: JSHandle<typeof globalThis> = await context.evaluateHandle(
|
134
|
+
* () => Promise.resolve(self)
|
135
|
+
* );
|
134
136
|
* ```
|
135
137
|
*
|
136
138
|
* @example
|
137
139
|
* A string can also be passed in instead of a function.
|
138
140
|
*
|
139
141
|
* ```ts
|
140
|
-
*
|
141
|
-
* const aHandle = await context.evaluateHandle('1 + 2');
|
142
|
+
* const handle: JSHandle<number> = await context.evaluateHandle('1 + 2');
|
142
143
|
* ```
|
143
144
|
*
|
144
145
|
* @example
|
145
|
-
*
|
146
|
-
* to the `executionContext.* evaluateHandle`:
|
146
|
+
* Handles can also be passed as `args`. They resolve to their referenced object:
|
147
147
|
*
|
148
148
|
* ```ts
|
149
|
-
* const
|
150
|
-
*
|
151
|
-
*
|
152
|
-
*
|
153
|
-
* await
|
149
|
+
* const bodyHandle: ElementHandle<HTMLBodyElement> =
|
150
|
+
* await context.evaluateHandle(() => {
|
151
|
+
* return document.body;
|
152
|
+
* });
|
153
|
+
* const stringHandle: JSHandle<string> = await context.evaluateHandle(
|
154
|
+
* body => body.innerHTML,
|
155
|
+
* body
|
156
|
+
* );
|
157
|
+
* console.log(await stringHandle.jsonValue()); // prints body's innerHTML
|
158
|
+
* // Always dispose your garbage! :)
|
159
|
+
* await bodyHandle.dispose();
|
160
|
+
* await stringHandle.dispose();
|
154
161
|
* ```
|
155
162
|
*
|
156
|
-
* @param pageFunction -
|
157
|
-
* @param args -
|
158
|
-
*
|
159
|
-
*
|
160
|
-
*
|
163
|
+
* @param pageFunction - The function to evaluate.
|
164
|
+
* @param args - Additional arguments to pass into the function.
|
165
|
+
* @returns A {@link JSHandle | handle} to the result of evaluating the
|
166
|
+
* function. If the result is a `Node`, then this will return an
|
167
|
+
* {@link ElementHandle | element handle}.
|
161
168
|
*/
|
162
169
|
evaluateHandle<Params extends unknown[], Func extends EvaluateFunc<Params> = EvaluateFunc<Params>>(pageFunction: Func | string, ...args: Params): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
|
163
170
|
/**
|
164
|
-
*
|
171
|
+
* Iterates through the JavaScript heap and finds all the objects with the
|
165
172
|
* given prototype.
|
166
|
-
*
|
173
|
+
*
|
167
174
|
* @example
|
175
|
+
*
|
168
176
|
* ```ts
|
169
177
|
* // Create a Map object
|
170
|
-
* await page.evaluate(() => window.map = new Map());
|
178
|
+
* await page.evaluate(() => (window.map = new Map()));
|
171
179
|
* // Get a handle to the Map object prototype
|
172
180
|
* const mapPrototype = await page.evaluateHandle(() => Map.prototype);
|
173
181
|
* // Query all map instances into an array
|
@@ -179,17 +187,8 @@ export declare class ExecutionContext {
|
|
179
187
|
* ```
|
180
188
|
*
|
181
189
|
* @param prototypeHandle - a handle to the object prototype
|
182
|
-
*
|
183
190
|
* @returns A handle to an array of objects with the given prototype.
|
184
191
|
*/
|
185
192
|
queryObjects<Prototype>(prototypeHandle: JSHandle<Prototype>): Promise<HandleFor<Prototype[]>>;
|
186
|
-
/**
|
187
|
-
* @internal
|
188
|
-
*/
|
189
|
-
_adoptBackendNodeId(backendNodeId?: Protocol.DOM.BackendNodeId): Promise<ElementHandle<Node>>;
|
190
|
-
/**
|
191
|
-
* @internal
|
192
|
-
*/
|
193
|
-
_adoptElementHandle<T extends ElementHandle<Node>>(elementHandle: T): Promise<T>;
|
194
193
|
}
|
195
194
|
//# sourceMappingURL=ExecutionContext.d.ts.map
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExecutionContext.d.ts","sourceRoot":"","sources":["../../../../src/common/ExecutionContext.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":"ExecutionContext.d.ts","sourceRoot":"","sources":["../../../../src/common/ExecutionContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAQnD;;GAEG;AACH,eAAO,MAAM,qBAAqB,2CAA2C,CAAC;AAG9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,gBAAgB;;IAC3B;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;gBAED,MAAM,EAAE,UAAU,EAClB,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,2BAA2B,EAC5D,KAAK,CAAC,EAAE,aAAa;IAQvB;;;;;;;OAOG;IACH,KAAK,IAAI,KAAK,GAAG,IAAI;IAIrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACG,QAAQ,CACZ,MAAM,SAAS,OAAO,EAAE,EACxB,IAAI,SAAS,YAAY,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,EAExD,YAAY,EAAE,IAAI,GAAG,MAAM,EAC3B,GAAG,IAAI,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAIrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgDG;IACG,cAAc,CAClB,MAAM,SAAS,OAAO,EAAE,EACxB,IAAI,SAAS,YAAY,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,EAExD,YAAY,EAAE,IAAI,GAAG,MAAM,EAC3B,GAAG,IAAI,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IA2KhD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,YAAY,CAAC,SAAS,EAC1B,eAAe,EAAE,QAAQ,CAAC,SAAS,CAAC,GACnC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;CAYnC"}
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js
CHANGED
@@ -19,30 +19,35 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
19
19
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
20
20
|
};
|
21
21
|
var _ExecutionContext_instances, _ExecutionContext_evaluate;
|
22
|
-
import { assert } from '
|
22
|
+
import { assert } from '../util/assert.js';
|
23
23
|
import { JSHandle } from './JSHandle.js';
|
24
|
-
import { getExceptionMessage, isString, valueFromRemoteObject,
|
24
|
+
import { createJSHandle, getExceptionMessage, isString, valueFromRemoteObject, } from './util.js';
|
25
25
|
/**
|
26
26
|
* @public
|
27
27
|
*/
|
28
28
|
export const EVALUATION_SCRIPT_URL = 'pptr://__puppeteer_evaluation_script__';
|
29
29
|
const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;
|
30
30
|
/**
|
31
|
-
*
|
32
|
-
* many execution contexts:
|
33
|
-
* - each
|
34
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe |
|
35
|
-
* frame } has "default" execution context that is always created after frame is
|
36
|
-
* attached to DOM. This context is returned by the
|
37
|
-
* {@link Frame.executionContext} method.
|
38
|
-
* - {@link https://developer.chrome.com/extensions | Extension}'s content scripts
|
39
|
-
* create additional execution contexts.
|
31
|
+
* @deprecated Do not use directly.
|
40
32
|
*
|
41
|
-
*
|
42
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API |
|
43
|
-
* workers }.
|
33
|
+
* Represents a context for JavaScript execution.
|
44
34
|
*
|
45
|
-
* @
|
35
|
+
* @example
|
36
|
+
* A {@link Page} can have several execution contexts:
|
37
|
+
*
|
38
|
+
* - Each {@link Frame} of a {@link Page | page} has a "default" execution
|
39
|
+
* context that is always created after frame is attached to DOM. This context
|
40
|
+
* is returned by the {@link Frame.executionContext} method.
|
41
|
+
* - Each {@link https://developer.chrome.com/extensions | Chrome extensions}
|
42
|
+
* creates additional execution contexts to isolate their code.
|
43
|
+
*
|
44
|
+
* @remarks
|
45
|
+
* By definition, each context is isolated from one another, however they are
|
46
|
+
* all able to manipulate non-JavaScript resources (such as DOM).
|
47
|
+
*
|
48
|
+
* @remarks
|
49
|
+
* Besides pages, execution contexts can be found in
|
50
|
+
* {@link WebWorker | workers}.
|
46
51
|
*/
|
47
52
|
export class ExecutionContext {
|
48
53
|
/**
|
@@ -56,29 +61,21 @@ export class ExecutionContext {
|
|
56
61
|
this._contextName = contextPayload.name;
|
57
62
|
}
|
58
63
|
/**
|
59
|
-
* @remarks
|
60
|
-
*
|
61
|
-
* Not every execution context is associated with a frame. For
|
62
|
-
* example, workers and extensions have execution contexts that are not
|
63
|
-
* associated with frames.
|
64
|
-
*
|
65
64
|
* @returns The frame associated with this execution context.
|
65
|
+
*
|
66
|
+
* @remarks
|
67
|
+
* Not every execution context is associated with a frame. For example,
|
68
|
+
* {@link WebWorker | workers} have execution contexts that are not associated
|
69
|
+
* with frames.
|
66
70
|
*/
|
67
71
|
frame() {
|
68
72
|
return this._world ? this._world.frame() : null;
|
69
73
|
}
|
70
74
|
/**
|
71
|
-
*
|
72
|
-
* If the function passed to the `executionContext.evaluate` returns a
|
73
|
-
* Promise, then `executionContext.evaluate` would wait for the promise to
|
74
|
-
* resolve and return its value. If the function passed to the
|
75
|
-
* `executionContext.evaluate` returns a non-serializable value, then
|
76
|
-
* `executionContext.evaluate` resolves to `undefined`. DevTools Protocol also
|
77
|
-
* supports transferring some additional values that are not serializable by
|
78
|
-
* `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
|
79
|
-
*
|
75
|
+
* Evaluates the given function.
|
80
76
|
*
|
81
77
|
* @example
|
78
|
+
*
|
82
79
|
* ```ts
|
83
80
|
* const executionContext = await page.mainFrame().executionContext();
|
84
81
|
* const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ;
|
@@ -86,86 +83,98 @@ export class ExecutionContext {
|
|
86
83
|
* ```
|
87
84
|
*
|
88
85
|
* @example
|
89
|
-
* A string can also be passed in instead of a function
|
86
|
+
* A string can also be passed in instead of a function:
|
90
87
|
*
|
91
88
|
* ```ts
|
92
89
|
* console.log(await executionContext.evaluate('1 + 2')); // prints "3"
|
93
90
|
* ```
|
94
91
|
*
|
95
92
|
* @example
|
96
|
-
*
|
97
|
-
*
|
93
|
+
* Handles can also be passed as `args`. They resolve to their referenced object:
|
94
|
+
*
|
98
95
|
* ```ts
|
99
96
|
* const oneHandle = await executionContext.evaluateHandle(() => 1);
|
100
97
|
* const twoHandle = await executionContext.evaluateHandle(() => 2);
|
101
98
|
* const result = await executionContext.evaluate(
|
102
|
-
*
|
99
|
+
* (a, b) => a + b,
|
100
|
+
* oneHandle,
|
101
|
+
* twoHandle
|
103
102
|
* );
|
104
103
|
* await oneHandle.dispose();
|
105
104
|
* await twoHandle.dispose();
|
106
105
|
* console.log(result); // prints '3'.
|
107
106
|
* ```
|
108
|
-
* @param pageFunction - a function to be evaluated in the `executionContext`
|
109
|
-
* @param args - argument to pass to the page function
|
110
107
|
*
|
111
|
-
* @
|
108
|
+
* @param pageFunction - The function to evaluate.
|
109
|
+
* @param args - Additional arguments to pass into the function.
|
110
|
+
* @returns The result of evaluating the function. If the result is an object,
|
111
|
+
* a vanilla object containing the serializable properties of the result is
|
112
|
+
* returned.
|
112
113
|
*/
|
113
114
|
async evaluate(pageFunction, ...args) {
|
114
115
|
return await __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, true, pageFunction, ...args);
|
115
116
|
}
|
116
117
|
/**
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
*
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
118
|
+
* Evaluates the given function.
|
119
|
+
*
|
120
|
+
* Unlike {@link ExecutionContext.evaluate | evaluate}, this method returns a
|
121
|
+
* handle to the result of the function.
|
122
|
+
*
|
123
|
+
* This method may be better suited if the object cannot be serialized (e.g.
|
124
|
+
* `Map`) and requires further manipulation.
|
124
125
|
*
|
125
126
|
* @example
|
127
|
+
*
|
126
128
|
* ```ts
|
127
129
|
* const context = await page.mainFrame().executionContext();
|
128
|
-
* const
|
129
|
-
*
|
130
|
+
* const handle: JSHandle<typeof globalThis> = await context.evaluateHandle(
|
131
|
+
* () => Promise.resolve(self)
|
132
|
+
* );
|
130
133
|
* ```
|
131
134
|
*
|
132
135
|
* @example
|
133
136
|
* A string can also be passed in instead of a function.
|
134
137
|
*
|
135
138
|
* ```ts
|
136
|
-
*
|
137
|
-
* const aHandle = await context.evaluateHandle('1 + 2');
|
139
|
+
* const handle: JSHandle<number> = await context.evaluateHandle('1 + 2');
|
138
140
|
* ```
|
139
141
|
*
|
140
142
|
* @example
|
141
|
-
*
|
142
|
-
* to the `executionContext.* evaluateHandle`:
|
143
|
+
* Handles can also be passed as `args`. They resolve to their referenced object:
|
143
144
|
*
|
144
145
|
* ```ts
|
145
|
-
* const
|
146
|
-
*
|
147
|
-
*
|
148
|
-
*
|
149
|
-
* await
|
146
|
+
* const bodyHandle: ElementHandle<HTMLBodyElement> =
|
147
|
+
* await context.evaluateHandle(() => {
|
148
|
+
* return document.body;
|
149
|
+
* });
|
150
|
+
* const stringHandle: JSHandle<string> = await context.evaluateHandle(
|
151
|
+
* body => body.innerHTML,
|
152
|
+
* body
|
153
|
+
* );
|
154
|
+
* console.log(await stringHandle.jsonValue()); // prints body's innerHTML
|
155
|
+
* // Always dispose your garbage! :)
|
156
|
+
* await bodyHandle.dispose();
|
157
|
+
* await stringHandle.dispose();
|
150
158
|
* ```
|
151
159
|
*
|
152
|
-
* @param pageFunction -
|
153
|
-
* @param args -
|
154
|
-
*
|
155
|
-
*
|
156
|
-
*
|
160
|
+
* @param pageFunction - The function to evaluate.
|
161
|
+
* @param args - Additional arguments to pass into the function.
|
162
|
+
* @returns A {@link JSHandle | handle} to the result of evaluating the
|
163
|
+
* function. If the result is a `Node`, then this will return an
|
164
|
+
* {@link ElementHandle | element handle}.
|
157
165
|
*/
|
158
166
|
async evaluateHandle(pageFunction, ...args) {
|
159
167
|
return __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, false, pageFunction, ...args);
|
160
168
|
}
|
161
169
|
/**
|
162
|
-
*
|
170
|
+
* Iterates through the JavaScript heap and finds all the objects with the
|
163
171
|
* given prototype.
|
164
|
-
*
|
172
|
+
*
|
165
173
|
* @example
|
174
|
+
*
|
166
175
|
* ```ts
|
167
176
|
* // Create a Map object
|
168
|
-
* await page.evaluate(() => window.map = new Map());
|
177
|
+
* await page.evaluate(() => (window.map = new Map()));
|
169
178
|
* // Get a handle to the Map object prototype
|
170
179
|
* const mapPrototype = await page.evaluateHandle(() => Map.prototype);
|
171
180
|
* // Query all map instances into an array
|
@@ -177,38 +186,17 @@ export class ExecutionContext {
|
|
177
186
|
* ```
|
178
187
|
*
|
179
188
|
* @param prototypeHandle - a handle to the object prototype
|
180
|
-
*
|
181
189
|
* @returns A handle to an array of objects with the given prototype.
|
182
190
|
*/
|
183
191
|
async queryObjects(prototypeHandle) {
|
184
|
-
assert(!prototypeHandle.
|
185
|
-
|
192
|
+
assert(!prototypeHandle.disposed, 'Prototype JSHandle is disposed!');
|
193
|
+
const remoteObject = prototypeHandle.remoteObject();
|
194
|
+
assert(remoteObject.objectId, 'Prototype JSHandle must not be referencing primitive value');
|
186
195
|
const response = await this._client.send('Runtime.queryObjects', {
|
187
|
-
prototypeObjectId:
|
196
|
+
prototypeObjectId: remoteObject.objectId,
|
188
197
|
});
|
189
198
|
return createJSHandle(this, response.objects);
|
190
199
|
}
|
191
|
-
/**
|
192
|
-
* @internal
|
193
|
-
*/
|
194
|
-
async _adoptBackendNodeId(backendNodeId) {
|
195
|
-
const { object } = await this._client.send('DOM.resolveNode', {
|
196
|
-
backendNodeId: backendNodeId,
|
197
|
-
executionContextId: this._contextId,
|
198
|
-
});
|
199
|
-
return createJSHandle(this, object);
|
200
|
-
}
|
201
|
-
/**
|
202
|
-
* @internal
|
203
|
-
*/
|
204
|
-
async _adoptElementHandle(elementHandle) {
|
205
|
-
assert(elementHandle.executionContext() !== this, 'Cannot adopt handle that already belongs to this execution context');
|
206
|
-
assert(this._world, 'Cannot adopt handle without DOMWorld');
|
207
|
-
const nodeInfo = await this._client.send('DOM.describeNode', {
|
208
|
-
objectId: elementHandle._remoteObject.objectId,
|
209
|
-
});
|
210
|
-
return (await this._adoptBackendNodeId(nodeInfo.node.backendNodeId));
|
211
|
-
}
|
212
200
|
}
|
213
201
|
_ExecutionContext_instances = new WeakSet(), _ExecutionContext_evaluate = async function _ExecutionContext_evaluate(returnByValue, pageFunction, ...args) {
|
214
202
|
const suffix = `//# sourceURL=${EVALUATION_SCRIPT_URL}`;
|
@@ -234,9 +222,6 @@ _ExecutionContext_instances = new WeakSet(), _ExecutionContext_evaluate = async
|
|
234
222
|
? valueFromRemoteObject(remoteObject)
|
235
223
|
: createJSHandle(this, remoteObject);
|
236
224
|
}
|
237
|
-
if (typeof pageFunction !== 'function') {
|
238
|
-
throw new Error(`Expected to get |string| or |function| as the first argument, but got "${pageFunction}" instead.`);
|
239
|
-
}
|
240
225
|
let functionText = pageFunction.toString();
|
241
226
|
try {
|
242
227
|
new Function('(' + functionText + ')');
|
@@ -303,21 +288,21 @@ _ExecutionContext_instances = new WeakSet(), _ExecutionContext_evaluate = async
|
|
303
288
|
}
|
304
289
|
const objectHandle = arg && arg instanceof JSHandle ? arg : null;
|
305
290
|
if (objectHandle) {
|
306
|
-
if (objectHandle.
|
291
|
+
if (objectHandle.executionContext() !== this) {
|
307
292
|
throw new Error('JSHandles can be evaluated only in the context they were created!');
|
308
293
|
}
|
309
|
-
if (objectHandle.
|
294
|
+
if (objectHandle.disposed) {
|
310
295
|
throw new Error('JSHandle is disposed!');
|
311
296
|
}
|
312
|
-
if (objectHandle.
|
297
|
+
if (objectHandle.remoteObject().unserializableValue) {
|
313
298
|
return {
|
314
|
-
unserializableValue: objectHandle.
|
299
|
+
unserializableValue: objectHandle.remoteObject().unserializableValue,
|
315
300
|
};
|
316
301
|
}
|
317
|
-
if (!objectHandle.
|
318
|
-
return { value: objectHandle.
|
302
|
+
if (!objectHandle.remoteObject().objectId) {
|
303
|
+
return { value: objectHandle.remoteObject().value };
|
319
304
|
}
|
320
|
-
return { objectId: objectHandle.
|
305
|
+
return { objectId: objectHandle.remoteObject().objectId };
|
321
306
|
}
|
322
307
|
return { value: arg };
|
323
308
|
}
|