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
@@ -25,14 +25,16 @@ 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 _FrameManager_instances, _FrameManager_page, _FrameManager_networkManager, _FrameManager_timeoutSettings, _FrameManager_frames, _FrameManager_contextIdToContext, _FrameManager_isolatedWorlds, _FrameManager_mainFrame, _FrameManager_client, _FrameManager_framesPendingTargetInit, _FrameManager_framesPendingAttachment, _FrameManager_onLifecycleEvent, _FrameManager_onFrameStartedLoading, _FrameManager_onFrameStoppedLoading, _FrameManager_handleFrameTree, _FrameManager_onFrameAttached, _FrameManager_onFrameNavigated, _FrameManager_onFrameNavigatedWithinDocument, _FrameManager_onFrameDetached, _FrameManager_onExecutionContextCreated, _FrameManager_onExecutionContextDestroyed, _FrameManager_onExecutionContextsCleared, _FrameManager_removeFramesRecursively
|
28
|
+
var _FrameManager_instances, _FrameManager_page, _FrameManager_networkManager, _FrameManager_timeoutSettings, _FrameManager_frames, _FrameManager_contextIdToContext, _FrameManager_isolatedWorlds, _FrameManager_mainFrame, _FrameManager_client, _FrameManager_framesPendingTargetInit, _FrameManager_framesPendingAttachment, _FrameManager_onLifecycleEvent, _FrameManager_onFrameStartedLoading, _FrameManager_onFrameStoppedLoading, _FrameManager_handleFrameTree, _FrameManager_onFrameAttached, _FrameManager_onFrameNavigated, _FrameManager_createIsolatedWorld, _FrameManager_onFrameNavigatedWithinDocument, _FrameManager_onFrameDetached, _FrameManager_onExecutionContextCreated, _FrameManager_onExecutionContextDestroyed, _FrameManager_onExecutionContextsCleared, _FrameManager_removeFramesRecursively;
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
-
exports.
|
31
|
-
const assert_js_1 = require("
|
32
|
-
const
|
30
|
+
exports.FrameManager = exports.FrameManagerEmittedEvents = void 0;
|
31
|
+
const assert_js_1 = require("../util/assert.js");
|
32
|
+
const DeferredPromise_js_1 = require("../util/DeferredPromise.js");
|
33
|
+
const ErrorLike_js_1 = require("../util/ErrorLike.js");
|
33
34
|
const EventEmitter_js_1 = require("./EventEmitter.js");
|
34
35
|
const ExecutionContext_js_1 = require("./ExecutionContext.js");
|
35
|
-
const
|
36
|
+
const Frame_js_1 = require("./Frame.js");
|
37
|
+
const IsolatedWorld_js_1 = require("./IsolatedWorld.js");
|
36
38
|
const NetworkManager_js_1 = require("./NetworkManager.js");
|
37
39
|
const util_js_1 = require("./util.js");
|
38
40
|
const UTILITY_WORLD_NAME = '__puppeteer_utility_world__';
|
@@ -53,6 +55,8 @@ exports.FrameManagerEmittedEvents = {
|
|
53
55
|
ExecutionContextDestroyed: Symbol('FrameManager.ExecutionContextDestroyed'),
|
54
56
|
};
|
55
57
|
/**
|
58
|
+
* A frame manager manages the frames for a given {@link Page | page}.
|
59
|
+
*
|
56
60
|
* @internal
|
57
61
|
*/
|
58
62
|
class FrameManager extends EventEmitter_js_1.EventEmitter {
|
@@ -82,16 +86,13 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
82
86
|
__classPrivateFieldSet(this, _FrameManager_timeoutSettings, timeoutSettings, "f");
|
83
87
|
this.setupEventListeners(__classPrivateFieldGet(this, _FrameManager_client, "f"));
|
84
88
|
}
|
85
|
-
|
86
|
-
* @internal
|
87
|
-
*/
|
88
|
-
get _timeoutSettings() {
|
89
|
+
get timeoutSettings() {
|
89
90
|
return __classPrivateFieldGet(this, _FrameManager_timeoutSettings, "f");
|
90
91
|
}
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
get
|
92
|
+
get networkManager() {
|
93
|
+
return __classPrivateFieldGet(this, _FrameManager_networkManager, "f");
|
94
|
+
}
|
95
|
+
get client() {
|
95
96
|
return __classPrivateFieldGet(this, _FrameManager_client, "f");
|
96
97
|
}
|
97
98
|
setupEventListeners(session) {
|
@@ -130,7 +131,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
130
131
|
var _a;
|
131
132
|
try {
|
132
133
|
if (!__classPrivateFieldGet(this, _FrameManager_framesPendingTargetInit, "f").has(targetId)) {
|
133
|
-
__classPrivateFieldGet(this, _FrameManager_framesPendingTargetInit, "f").set(targetId, (0,
|
134
|
+
__classPrivateFieldGet(this, _FrameManager_framesPendingTargetInit, "f").set(targetId, (0, DeferredPromise_js_1.createDeferredPromiseWithTimer)(`Waiting for target frame ${targetId} failed`));
|
134
135
|
}
|
135
136
|
const result = await Promise.all([
|
136
137
|
client.send('Page.enable'),
|
@@ -141,7 +142,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
141
142
|
await Promise.all([
|
142
143
|
client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
|
143
144
|
client.send('Runtime.enable').then(() => {
|
144
|
-
return this.
|
145
|
+
return __classPrivateFieldGet(this, _FrameManager_instances, "m", _FrameManager_createIsolatedWorld).call(this, client, UTILITY_WORLD_NAME);
|
145
146
|
}),
|
146
147
|
// TODO: Network manager is not aware of OOP iframes yet.
|
147
148
|
client === __classPrivateFieldGet(this, _FrameManager_client, "f")
|
@@ -151,7 +152,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
151
152
|
}
|
152
153
|
catch (error) {
|
153
154
|
// The target might have been closed before the initialization finished.
|
154
|
-
if ((0,
|
155
|
+
if ((0, ErrorLike_js_1.isErrorLike)(error) &&
|
155
156
|
(error.message.includes('Target closed') ||
|
156
157
|
error.message.includes('Session closed'))) {
|
157
158
|
return;
|
@@ -163,78 +164,37 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
163
164
|
__classPrivateFieldGet(this, _FrameManager_framesPendingTargetInit, "f").delete(targetId);
|
164
165
|
}
|
165
166
|
}
|
166
|
-
|
167
|
-
|
167
|
+
executionContextById(contextId, session = __classPrivateFieldGet(this, _FrameManager_client, "f")) {
|
168
|
+
const key = `${session.id()}:${contextId}`;
|
169
|
+
const context = __classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").get(key);
|
170
|
+
(0, assert_js_1.assert)(context, 'INTERNAL ERROR: missing context with id = ' + contextId);
|
171
|
+
return context;
|
168
172
|
}
|
169
|
-
|
170
|
-
|
171
|
-
const { referer = __classPrivateFieldGet(this, _FrameManager_networkManager, "f").extraHTTPHeaders()['referer'], waitUntil = ['load'], timeout = __classPrivateFieldGet(this, _FrameManager_timeoutSettings, "f").navigationTimeout(), } = options;
|
172
|
-
let ensureNewDocumentNavigation = false;
|
173
|
-
const watcher = new LifecycleWatcher_js_1.LifecycleWatcher(this, frame, waitUntil, timeout);
|
174
|
-
let error = await Promise.race([
|
175
|
-
navigate(__classPrivateFieldGet(this, _FrameManager_client, "f"), url, referer, frame._id),
|
176
|
-
watcher.timeoutOrTerminationPromise(),
|
177
|
-
]);
|
178
|
-
if (!error) {
|
179
|
-
error = await Promise.race([
|
180
|
-
watcher.timeoutOrTerminationPromise(),
|
181
|
-
ensureNewDocumentNavigation
|
182
|
-
? watcher.newDocumentNavigationPromise()
|
183
|
-
: watcher.sameDocumentNavigationPromise(),
|
184
|
-
]);
|
185
|
-
}
|
186
|
-
watcher.dispose();
|
187
|
-
if (error) {
|
188
|
-
throw error;
|
189
|
-
}
|
190
|
-
return await watcher.navigationResponse();
|
191
|
-
async function navigate(client, url, referrer, frameId) {
|
192
|
-
try {
|
193
|
-
const response = await client.send('Page.navigate', {
|
194
|
-
url,
|
195
|
-
referrer,
|
196
|
-
frameId,
|
197
|
-
});
|
198
|
-
ensureNewDocumentNavigation = !!response.loaderId;
|
199
|
-
return response.errorText
|
200
|
-
? new Error(`${response.errorText} at ${url}`)
|
201
|
-
: null;
|
202
|
-
}
|
203
|
-
catch (error) {
|
204
|
-
if ((0, util_js_1.isErrorLike)(error)) {
|
205
|
-
return error;
|
206
|
-
}
|
207
|
-
throw error;
|
208
|
-
}
|
209
|
-
}
|
173
|
+
page() {
|
174
|
+
return __classPrivateFieldGet(this, _FrameManager_page, "f");
|
210
175
|
}
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
watcher.dispose();
|
221
|
-
if (error) {
|
222
|
-
throw error;
|
223
|
-
}
|
224
|
-
return await watcher.navigationResponse();
|
176
|
+
mainFrame() {
|
177
|
+
(0, assert_js_1.assert)(__classPrivateFieldGet(this, _FrameManager_mainFrame, "f"), 'Requesting main frame too early!');
|
178
|
+
return __classPrivateFieldGet(this, _FrameManager_mainFrame, "f");
|
179
|
+
}
|
180
|
+
frames() {
|
181
|
+
return Array.from(__classPrivateFieldGet(this, _FrameManager_frames, "f").values());
|
182
|
+
}
|
183
|
+
frame(frameId) {
|
184
|
+
return __classPrivateFieldGet(this, _FrameManager_frames, "f").get(frameId) || null;
|
225
185
|
}
|
226
|
-
|
186
|
+
onAttachedToTarget(target) {
|
227
187
|
if (target._getTargetInfo().type !== 'iframe') {
|
228
188
|
return;
|
229
189
|
}
|
230
190
|
const frame = __classPrivateFieldGet(this, _FrameManager_frames, "f").get(target._getTargetInfo().targetId);
|
231
191
|
if (frame) {
|
232
|
-
frame.
|
192
|
+
frame.updateClient(target._session());
|
233
193
|
}
|
234
194
|
this.setupEventListeners(target._session());
|
235
195
|
this.initialize(target._getTargetInfo().targetId, target._session());
|
236
196
|
}
|
237
|
-
|
197
|
+
onDetachedFromTarget(target) {
|
238
198
|
const frame = __classPrivateFieldGet(this, _FrameManager_frames, "f").get(target._targetId);
|
239
199
|
if (frame && frame.isOOPFrame()) {
|
240
200
|
// When an OOP iframe is removed from the page, it
|
@@ -242,50 +202,6 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
242
202
|
__classPrivateFieldGet(this, _FrameManager_instances, "m", _FrameManager_removeFramesRecursively).call(this, frame);
|
243
203
|
}
|
244
204
|
}
|
245
|
-
page() {
|
246
|
-
return __classPrivateFieldGet(this, _FrameManager_page, "f");
|
247
|
-
}
|
248
|
-
mainFrame() {
|
249
|
-
(0, assert_js_1.assert)(__classPrivateFieldGet(this, _FrameManager_mainFrame, "f"), 'Requesting main frame too early!');
|
250
|
-
return __classPrivateFieldGet(this, _FrameManager_mainFrame, "f");
|
251
|
-
}
|
252
|
-
frames() {
|
253
|
-
return Array.from(__classPrivateFieldGet(this, _FrameManager_frames, "f").values());
|
254
|
-
}
|
255
|
-
frame(frameId) {
|
256
|
-
return __classPrivateFieldGet(this, _FrameManager_frames, "f").get(frameId) || null;
|
257
|
-
}
|
258
|
-
async _ensureIsolatedWorld(session, name) {
|
259
|
-
const key = `${session.id()}:${name}`;
|
260
|
-
if (__classPrivateFieldGet(this, _FrameManager_isolatedWorlds, "f").has(key)) {
|
261
|
-
return;
|
262
|
-
}
|
263
|
-
__classPrivateFieldGet(this, _FrameManager_isolatedWorlds, "f").add(key);
|
264
|
-
await session.send('Page.addScriptToEvaluateOnNewDocument', {
|
265
|
-
source: `//# sourceURL=${ExecutionContext_js_1.EVALUATION_SCRIPT_URL}`,
|
266
|
-
worldName: name,
|
267
|
-
});
|
268
|
-
// Frames might be removed before we send this.
|
269
|
-
await Promise.all(this.frames()
|
270
|
-
.filter(frame => {
|
271
|
-
return frame._client() === session;
|
272
|
-
})
|
273
|
-
.map(frame => {
|
274
|
-
return session
|
275
|
-
.send('Page.createIsolatedWorld', {
|
276
|
-
frameId: frame._id,
|
277
|
-
worldName: name,
|
278
|
-
grantUniveralAccess: true,
|
279
|
-
})
|
280
|
-
.catch(util_js_1.debugError);
|
281
|
-
}));
|
282
|
-
}
|
283
|
-
executionContextById(contextId, session = __classPrivateFieldGet(this, _FrameManager_client, "f")) {
|
284
|
-
const key = `${session.id()}:${contextId}`;
|
285
|
-
const context = __classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").get(key);
|
286
|
-
(0, assert_js_1.assert)(context, 'INTERNAL ERROR: missing context with id = ' + contextId);
|
287
|
-
return context;
|
288
|
-
}
|
289
205
|
}
|
290
206
|
exports.FrameManager = FrameManager;
|
291
207
|
_FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap(), _FrameManager_timeoutSettings = new WeakMap(), _FrameManager_frames = new WeakMap(), _FrameManager_contextIdToContext = new WeakMap(), _FrameManager_isolatedWorlds = new WeakMap(), _FrameManager_mainFrame = new WeakMap(), _FrameManager_client = new WeakMap(), _FrameManager_framesPendingTargetInit = new WeakMap(), _FrameManager_framesPendingAttachment = new WeakMap(), _FrameManager_instances = new WeakSet(), _FrameManager_onLifecycleEvent = function _FrameManager_onLifecycleEvent(event) {
|
@@ -326,25 +242,26 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
326
242
|
// If an OOP iframes becomes a normal iframe again
|
327
243
|
// it is first attached to the parent page before
|
328
244
|
// the target is removed.
|
329
|
-
frame.
|
245
|
+
frame.updateClient(session);
|
330
246
|
}
|
331
247
|
return;
|
332
248
|
}
|
333
249
|
const parentFrame = __classPrivateFieldGet(this, _FrameManager_frames, "f").get(parentFrameId);
|
334
250
|
const complete = (parentFrame) => {
|
335
251
|
(0, assert_js_1.assert)(parentFrame, `Parent frame ${parentFrameId} not found`);
|
336
|
-
const frame = new Frame(this, parentFrame, frameId, session);
|
252
|
+
const frame = new Frame_js_1.Frame(this, parentFrame, frameId, session);
|
337
253
|
__classPrivateFieldGet(this, _FrameManager_frames, "f").set(frame._id, frame);
|
338
254
|
this.emit(exports.FrameManagerEmittedEvents.FrameAttached, frame);
|
339
255
|
};
|
340
256
|
if (parentFrame) {
|
341
257
|
return complete(parentFrame);
|
342
258
|
}
|
343
|
-
|
259
|
+
const frame = __classPrivateFieldGet(this, _FrameManager_framesPendingTargetInit, "f").get(parentFrameId);
|
260
|
+
if (frame) {
|
344
261
|
if (!__classPrivateFieldGet(this, _FrameManager_framesPendingAttachment, "f").has(frameId)) {
|
345
|
-
__classPrivateFieldGet(this, _FrameManager_framesPendingAttachment, "f").set(frameId, (0,
|
262
|
+
__classPrivateFieldGet(this, _FrameManager_framesPendingAttachment, "f").set(frameId, (0, DeferredPromise_js_1.createDeferredPromiseWithTimer)(`Waiting for frame ${frameId} to attach failed`));
|
346
263
|
}
|
347
|
-
|
264
|
+
frame.then(() => {
|
348
265
|
var _a;
|
349
266
|
complete(__classPrivateFieldGet(this, _FrameManager_frames, "f").get(parentFrameId));
|
350
267
|
(_a = __classPrivateFieldGet(this, _FrameManager_framesPendingAttachment, "f").get(frameId)) === null || _a === void 0 ? void 0 : _a.resolve();
|
@@ -374,7 +291,7 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
374
291
|
}
|
375
292
|
else {
|
376
293
|
// Initial main frame navigation.
|
377
|
-
frame = new Frame(this, null, frameId, __classPrivateFieldGet(this, _FrameManager_client, "f"));
|
294
|
+
frame = new Frame_js_1.Frame(this, null, frameId, __classPrivateFieldGet(this, _FrameManager_client, "f"));
|
378
295
|
}
|
379
296
|
__classPrivateFieldGet(this, _FrameManager_frames, "f").set(frameId, frame);
|
380
297
|
__classPrivateFieldSet(this, _FrameManager_mainFrame, frame, "f");
|
@@ -384,14 +301,40 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
384
301
|
frame._navigated(framePayload);
|
385
302
|
this.emit(exports.FrameManagerEmittedEvents.FrameNavigated, frame);
|
386
303
|
};
|
387
|
-
|
388
|
-
|
304
|
+
const pendingFrame = __classPrivateFieldGet(this, _FrameManager_framesPendingAttachment, "f").get(frameId);
|
305
|
+
if (pendingFrame) {
|
306
|
+
pendingFrame.then(() => {
|
389
307
|
complete(isMainFrame ? __classPrivateFieldGet(this, _FrameManager_mainFrame, "f") : __classPrivateFieldGet(this, _FrameManager_frames, "f").get(frameId));
|
390
308
|
});
|
391
309
|
}
|
392
310
|
else {
|
393
311
|
complete(frame);
|
394
312
|
}
|
313
|
+
}, _FrameManager_createIsolatedWorld = async function _FrameManager_createIsolatedWorld(session, name) {
|
314
|
+
const key = `${session.id()}:${name}`;
|
315
|
+
if (__classPrivateFieldGet(this, _FrameManager_isolatedWorlds, "f").has(key)) {
|
316
|
+
return;
|
317
|
+
}
|
318
|
+
await session.send('Page.addScriptToEvaluateOnNewDocument', {
|
319
|
+
source: `//# sourceURL=${ExecutionContext_js_1.EVALUATION_SCRIPT_URL}`,
|
320
|
+
worldName: name,
|
321
|
+
});
|
322
|
+
await Promise.all(this.frames()
|
323
|
+
.filter(frame => {
|
324
|
+
return frame._client() === session;
|
325
|
+
})
|
326
|
+
.map(frame => {
|
327
|
+
// Frames might be removed before we send this, so we don't want to
|
328
|
+
// throw an error.
|
329
|
+
return session
|
330
|
+
.send('Page.createIsolatedWorld', {
|
331
|
+
frameId: frame._id,
|
332
|
+
worldName: name,
|
333
|
+
grantUniveralAccess: true,
|
334
|
+
})
|
335
|
+
.catch(util_js_1.debugError);
|
336
|
+
}));
|
337
|
+
__classPrivateFieldGet(this, _FrameManager_isolatedWorlds, "f").add(key);
|
395
338
|
}, _FrameManager_onFrameNavigatedWithinDocument = function _FrameManager_onFrameNavigatedWithinDocument(frameId, url) {
|
396
339
|
const frame = __classPrivateFieldGet(this, _FrameManager_frames, "f").get(frameId);
|
397
340
|
if (!frame) {
|
@@ -424,19 +367,19 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
424
367
|
return;
|
425
368
|
}
|
426
369
|
if (contextPayload.auxData && !!contextPayload.auxData['isDefault']) {
|
427
|
-
world = frame.
|
370
|
+
world = frame.worlds[IsolatedWorld_js_1.MAIN_WORLD];
|
428
371
|
}
|
429
372
|
else if (contextPayload.name === UTILITY_WORLD_NAME &&
|
430
|
-
!frame.
|
373
|
+
!frame.worlds[IsolatedWorld_js_1.PUPPETEER_WORLD].hasContext()) {
|
431
374
|
// In case of multiple sessions to the same target, there's a race between
|
432
375
|
// connections so we might end up creating multiple isolated worlds.
|
433
376
|
// We can use either.
|
434
|
-
world = frame.
|
377
|
+
world = frame.worlds[IsolatedWorld_js_1.PUPPETEER_WORLD];
|
435
378
|
}
|
436
379
|
}
|
437
380
|
const context = new ExecutionContext_js_1.ExecutionContext((frame === null || frame === void 0 ? void 0 : frame._client()) || __classPrivateFieldGet(this, _FrameManager_client, "f"), contextPayload, world);
|
438
381
|
if (world) {
|
439
|
-
world.
|
382
|
+
world.setContext(context);
|
440
383
|
}
|
441
384
|
const key = `${session.id()}:${contextPayload.id}`;
|
442
385
|
__classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").set(key, context);
|
@@ -448,7 +391,7 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
448
391
|
}
|
449
392
|
__classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").delete(key);
|
450
393
|
if (context._world) {
|
451
|
-
context._world.
|
394
|
+
context._world.clearContext();
|
452
395
|
}
|
453
396
|
}, _FrameManager_onExecutionContextsCleared = function _FrameManager_onExecutionContextsCleared(session) {
|
454
397
|
for (const [key, context] of __classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").entries()) {
|
@@ -458,7 +401,7 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
458
401
|
continue;
|
459
402
|
}
|
460
403
|
if (context._world) {
|
461
|
-
context._world.
|
404
|
+
context._world.clearContext();
|
462
405
|
}
|
463
406
|
__classPrivateFieldGet(this, _FrameManager_contextIdToContext, "f").delete(key);
|
464
407
|
}
|
@@ -470,673 +413,4 @@ _FrameManager_page = new WeakMap(), _FrameManager_networkManager = new WeakMap()
|
|
470
413
|
__classPrivateFieldGet(this, _FrameManager_frames, "f").delete(frame._id);
|
471
414
|
this.emit(exports.FrameManagerEmittedEvents.FrameDetached, frame);
|
472
415
|
};
|
473
|
-
/**
|
474
|
-
* At every point of time, page exposes its current frame tree via the
|
475
|
-
* {@link Page.mainFrame | page.mainFrame} and
|
476
|
-
* {@link Frame.childFrames | frame.childFrames} methods.
|
477
|
-
*
|
478
|
-
* @remarks
|
479
|
-
*
|
480
|
-
* `Frame` object lifecycles are controlled by three events that are all
|
481
|
-
* dispatched on the page object:
|
482
|
-
*
|
483
|
-
* - {@link PageEmittedEvents.FrameAttached}
|
484
|
-
*
|
485
|
-
* - {@link PageEmittedEvents.FrameNavigated}
|
486
|
-
*
|
487
|
-
* - {@link PageEmittedEvents.FrameDetached}
|
488
|
-
*
|
489
|
-
* @Example
|
490
|
-
* An example of dumping frame tree:
|
491
|
-
*
|
492
|
-
* ```ts
|
493
|
-
* const puppeteer = require('puppeteer');
|
494
|
-
*
|
495
|
-
* (async () => {
|
496
|
-
* const browser = await puppeteer.launch();
|
497
|
-
* const page = await browser.newPage();
|
498
|
-
* await page.goto('https://www.google.com/chrome/browser/canary.html');
|
499
|
-
* dumpFrameTree(page.mainFrame(), '');
|
500
|
-
* await browser.close();
|
501
|
-
*
|
502
|
-
* function dumpFrameTree(frame, indent) {
|
503
|
-
* console.log(indent + frame.url());
|
504
|
-
* for (const child of frame.childFrames()) {
|
505
|
-
* dumpFrameTree(child, indent + ' ');
|
506
|
-
* }
|
507
|
-
* }
|
508
|
-
* })();
|
509
|
-
* ```
|
510
|
-
*
|
511
|
-
* @Example
|
512
|
-
* An example of getting text from an iframe element:
|
513
|
-
*
|
514
|
-
* ```ts
|
515
|
-
* const frame = page.frames().find(frame => frame.name() === 'myframe');
|
516
|
-
* const text = await frame.$eval('.selector', element => element.textContent);
|
517
|
-
* console.log(text);
|
518
|
-
* ```
|
519
|
-
*
|
520
|
-
* @public
|
521
|
-
*/
|
522
|
-
class Frame {
|
523
|
-
/**
|
524
|
-
* @internal
|
525
|
-
*/
|
526
|
-
constructor(frameManager, parentFrame, frameId, client) {
|
527
|
-
_Frame_parentFrame.set(this, void 0);
|
528
|
-
_Frame_url.set(this, '');
|
529
|
-
_Frame_detached.set(this, false);
|
530
|
-
_Frame_client.set(this, void 0);
|
531
|
-
/**
|
532
|
-
* @internal
|
533
|
-
*/
|
534
|
-
this._loaderId = '';
|
535
|
-
/**
|
536
|
-
* @internal
|
537
|
-
*/
|
538
|
-
this._hasStartedLoading = false;
|
539
|
-
/**
|
540
|
-
* @internal
|
541
|
-
*/
|
542
|
-
this._lifecycleEvents = new Set();
|
543
|
-
this._frameManager = frameManager;
|
544
|
-
__classPrivateFieldSet(this, _Frame_parentFrame, parentFrame !== null && parentFrame !== void 0 ? parentFrame : null, "f");
|
545
|
-
__classPrivateFieldSet(this, _Frame_url, '', "f");
|
546
|
-
this._id = frameId;
|
547
|
-
__classPrivateFieldSet(this, _Frame_detached, false, "f");
|
548
|
-
this._loaderId = '';
|
549
|
-
this._childFrames = new Set();
|
550
|
-
if (__classPrivateFieldGet(this, _Frame_parentFrame, "f")) {
|
551
|
-
__classPrivateFieldGet(this, _Frame_parentFrame, "f")._childFrames.add(this);
|
552
|
-
}
|
553
|
-
this._updateClient(client);
|
554
|
-
}
|
555
|
-
/**
|
556
|
-
* @internal
|
557
|
-
*/
|
558
|
-
_updateClient(client) {
|
559
|
-
__classPrivateFieldSet(this, _Frame_client, client, "f");
|
560
|
-
this._mainWorld = new DOMWorld_js_1.DOMWorld(__classPrivateFieldGet(this, _Frame_client, "f"), this._frameManager, this, this._frameManager._timeoutSettings);
|
561
|
-
this._secondaryWorld = new DOMWorld_js_1.DOMWorld(__classPrivateFieldGet(this, _Frame_client, "f"), this._frameManager, this, this._frameManager._timeoutSettings);
|
562
|
-
}
|
563
|
-
/**
|
564
|
-
* @returns a page associated with the frame.
|
565
|
-
*/
|
566
|
-
page() {
|
567
|
-
return this._frameManager.page();
|
568
|
-
}
|
569
|
-
/**
|
570
|
-
* @remarks
|
571
|
-
*
|
572
|
-
* @returns `true` if the frame is an OOP frame, or `false` otherwise.
|
573
|
-
*/
|
574
|
-
isOOPFrame() {
|
575
|
-
return __classPrivateFieldGet(this, _Frame_client, "f") !== this._frameManager._client;
|
576
|
-
}
|
577
|
-
/**
|
578
|
-
* @remarks
|
579
|
-
*
|
580
|
-
* `frame.goto` will throw an error if:
|
581
|
-
* - there's an SSL error (e.g. in case of self-signed certificates).
|
582
|
-
*
|
583
|
-
* - target URL is invalid.
|
584
|
-
*
|
585
|
-
* - the `timeout` is exceeded during navigation.
|
586
|
-
*
|
587
|
-
* - the remote server does not respond or is unreachable.
|
588
|
-
*
|
589
|
-
* - the main resource failed to load.
|
590
|
-
*
|
591
|
-
* `frame.goto` will not throw an error when any valid HTTP status code is
|
592
|
-
* returned by the remote server, including 404 "Not Found" and 500 "Internal
|
593
|
-
* Server Error". The status code for such responses can be retrieved by
|
594
|
-
* calling {@link HTTPResponse.status}.
|
595
|
-
*
|
596
|
-
* NOTE: `frame.goto` either throws an error or returns a main resource
|
597
|
-
* response. The only exceptions are navigation to `about:blank` or
|
598
|
-
* navigation to the same URL with a different hash, which would succeed and
|
599
|
-
* return `null`.
|
600
|
-
*
|
601
|
-
* NOTE: Headless mode doesn't support navigation to a PDF document. See
|
602
|
-
* the {@link https://bugs.chromium.org/p/chromium/issues/detail?id=761295 | upstream
|
603
|
-
* issue}.
|
604
|
-
*
|
605
|
-
* @param url - the URL to navigate the frame to. This should include the
|
606
|
-
* scheme, e.g. `https://`.
|
607
|
-
* @param options - navigation options. `waitUntil` is useful to define when
|
608
|
-
* the navigation should be considered successful - see the docs for
|
609
|
-
* {@link PuppeteerLifeCycleEvent} for more details.
|
610
|
-
*
|
611
|
-
* @returns A promise which resolves to the main resource response. In case of
|
612
|
-
* multiple redirects, the navigation will resolve with the response of the
|
613
|
-
* last redirect.
|
614
|
-
*/
|
615
|
-
async goto(url, options = {}) {
|
616
|
-
return await this._frameManager.navigateFrame(this, url, options);
|
617
|
-
}
|
618
|
-
/**
|
619
|
-
* @remarks
|
620
|
-
*
|
621
|
-
* This resolves when the frame navigates to a new URL. It is useful for when
|
622
|
-
* you run code which will indirectly cause the frame to navigate. Consider
|
623
|
-
* this example:
|
624
|
-
*
|
625
|
-
* ```ts
|
626
|
-
* const [response] = await Promise.all([
|
627
|
-
* // The navigation promise resolves after navigation has finished
|
628
|
-
* frame.waitForNavigation(),
|
629
|
-
* // Clicking the link will indirectly cause a navigation
|
630
|
-
* frame.click('a.my-link'),
|
631
|
-
* ]);
|
632
|
-
* ```
|
633
|
-
*
|
634
|
-
* Usage of the {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API} to change the URL is considered a navigation.
|
635
|
-
*
|
636
|
-
* @param options - options to configure when the navigation is consided finished.
|
637
|
-
* @returns a promise that resolves when the frame navigates to a new URL.
|
638
|
-
*/
|
639
|
-
async waitForNavigation(options = {}) {
|
640
|
-
return await this._frameManager.waitForFrameNavigation(this, options);
|
641
|
-
}
|
642
|
-
/**
|
643
|
-
* @internal
|
644
|
-
*/
|
645
|
-
_client() {
|
646
|
-
return __classPrivateFieldGet(this, _Frame_client, "f");
|
647
|
-
}
|
648
|
-
/**
|
649
|
-
* @returns a promise that resolves to the frame's default execution context.
|
650
|
-
*/
|
651
|
-
executionContext() {
|
652
|
-
return this._mainWorld.executionContext();
|
653
|
-
}
|
654
|
-
/**
|
655
|
-
* @remarks
|
656
|
-
*
|
657
|
-
* The only difference between {@link Frame.evaluate} and
|
658
|
-
* `frame.evaluateHandle` is that `evaluateHandle` will return the value
|
659
|
-
* wrapped in an in-page object.
|
660
|
-
*
|
661
|
-
* This method behaves identically to {@link Page.evaluateHandle} except it's
|
662
|
-
* run within the context of the `frame`, rather than the entire page.
|
663
|
-
*
|
664
|
-
* @param pageFunction - a function that is run within the frame
|
665
|
-
* @param args - arguments to be passed to the pageFunction
|
666
|
-
*/
|
667
|
-
async evaluateHandle(pageFunction, ...args) {
|
668
|
-
return this._mainWorld.evaluateHandle(pageFunction, ...args);
|
669
|
-
}
|
670
|
-
/**
|
671
|
-
* @remarks
|
672
|
-
*
|
673
|
-
* This method behaves identically to {@link Page.evaluate} except it's run
|
674
|
-
* within the context of the `frame`, rather than the entire page.
|
675
|
-
*
|
676
|
-
* @param pageFunction - a function that is run within the frame
|
677
|
-
* @param args - arguments to be passed to the pageFunction
|
678
|
-
*/
|
679
|
-
async evaluate(pageFunction, ...args) {
|
680
|
-
return this._mainWorld.evaluate(pageFunction, ...args);
|
681
|
-
}
|
682
|
-
/**
|
683
|
-
* This method queries the frame for the given selector.
|
684
|
-
*
|
685
|
-
* @param selector - a selector to query for.
|
686
|
-
* @returns A promise which resolves to an `ElementHandle` pointing at the
|
687
|
-
* element, or `null` if it was not found.
|
688
|
-
*/
|
689
|
-
async $(selector) {
|
690
|
-
return this._mainWorld.$(selector);
|
691
|
-
}
|
692
|
-
/**
|
693
|
-
* This runs `document.querySelectorAll` in the frame and returns the result.
|
694
|
-
*
|
695
|
-
* @param selector - a selector to search for
|
696
|
-
* @returns An array of element handles pointing to the found frame elements.
|
697
|
-
*/
|
698
|
-
async $$(selector) {
|
699
|
-
return this._mainWorld.$$(selector);
|
700
|
-
}
|
701
|
-
/**
|
702
|
-
* This method evaluates the given XPath expression and returns the results.
|
703
|
-
*
|
704
|
-
* @param expression - the XPath expression to evaluate.
|
705
|
-
*/
|
706
|
-
async $x(expression) {
|
707
|
-
return this._mainWorld.$x(expression);
|
708
|
-
}
|
709
|
-
/**
|
710
|
-
* @remarks
|
711
|
-
*
|
712
|
-
* This method runs `document.querySelector` within
|
713
|
-
* the frame and passes it as the first argument to `pageFunction`.
|
714
|
-
*
|
715
|
-
* If `pageFunction` returns a Promise, then `frame.$eval` would wait for
|
716
|
-
* the promise to resolve and return its value.
|
717
|
-
*
|
718
|
-
* @example
|
719
|
-
*
|
720
|
-
* ```ts
|
721
|
-
* const searchValue = await frame.$eval('#search', el => el.value);
|
722
|
-
* ```
|
723
|
-
*
|
724
|
-
* @param selector - the selector to query for
|
725
|
-
* @param pageFunction - the function to be evaluated in the frame's context
|
726
|
-
* @param args - additional arguments to pass to `pageFunction`
|
727
|
-
*/
|
728
|
-
async $eval(selector, pageFunction, ...args) {
|
729
|
-
return this._mainWorld.$eval(selector, pageFunction, ...args);
|
730
|
-
}
|
731
|
-
/**
|
732
|
-
* @remarks
|
733
|
-
*
|
734
|
-
* This method runs `Array.from(document.querySelectorAll(selector))` within
|
735
|
-
* the frame and passes it as the first argument to `pageFunction`.
|
736
|
-
*
|
737
|
-
* If `pageFunction` returns a Promise, then `frame.$$eval` would wait for
|
738
|
-
* the promise to resolve and return its value.
|
739
|
-
*
|
740
|
-
* @example
|
741
|
-
*
|
742
|
-
* ```ts
|
743
|
-
* const divsCounts = await frame.$$eval('div', divs => divs.length);
|
744
|
-
* ```
|
745
|
-
*
|
746
|
-
* @param selector - the selector to query for
|
747
|
-
* @param pageFunction - the function to be evaluated in the frame's context
|
748
|
-
* @param args - additional arguments to pass to `pageFunction`
|
749
|
-
*/
|
750
|
-
async $$eval(selector, pageFunction, ...args) {
|
751
|
-
return this._mainWorld.$$eval(selector, pageFunction, ...args);
|
752
|
-
}
|
753
|
-
/**
|
754
|
-
* @returns the full HTML contents of the frame, including the doctype.
|
755
|
-
*/
|
756
|
-
async content() {
|
757
|
-
return this._secondaryWorld.content();
|
758
|
-
}
|
759
|
-
/**
|
760
|
-
* Set the content of the frame.
|
761
|
-
*
|
762
|
-
* @param html - HTML markup to assign to the page.
|
763
|
-
* @param options - options to configure how long before timing out and at
|
764
|
-
* what point to consider the content setting successful.
|
765
|
-
*/
|
766
|
-
async setContent(html, options = {}) {
|
767
|
-
return this._secondaryWorld.setContent(html, options);
|
768
|
-
}
|
769
|
-
/**
|
770
|
-
* @remarks
|
771
|
-
*
|
772
|
-
* If the name is empty, it returns the `id` attribute instead.
|
773
|
-
*
|
774
|
-
* Note: This value is calculated once when the frame is created, and will not
|
775
|
-
* update if the attribute is changed later.
|
776
|
-
*
|
777
|
-
* @returns the frame's `name` attribute as specified in the tag.
|
778
|
-
*/
|
779
|
-
name() {
|
780
|
-
return this._name || '';
|
781
|
-
}
|
782
|
-
/**
|
783
|
-
* @returns the frame's URL.
|
784
|
-
*/
|
785
|
-
url() {
|
786
|
-
return __classPrivateFieldGet(this, _Frame_url, "f");
|
787
|
-
}
|
788
|
-
/**
|
789
|
-
* @returns the parent `Frame`, if any. Detached and main frames return `null`.
|
790
|
-
*/
|
791
|
-
parentFrame() {
|
792
|
-
return __classPrivateFieldGet(this, _Frame_parentFrame, "f");
|
793
|
-
}
|
794
|
-
/**
|
795
|
-
* @returns an array of child frames.
|
796
|
-
*/
|
797
|
-
childFrames() {
|
798
|
-
return Array.from(this._childFrames);
|
799
|
-
}
|
800
|
-
/**
|
801
|
-
* @returns `true` if the frame has been detached, or `false` otherwise.
|
802
|
-
*/
|
803
|
-
isDetached() {
|
804
|
-
return __classPrivateFieldGet(this, _Frame_detached, "f");
|
805
|
-
}
|
806
|
-
/**
|
807
|
-
* Adds a `<script>` tag into the page with the desired url or content.
|
808
|
-
*
|
809
|
-
* @param options - configure the script to add to the page.
|
810
|
-
*
|
811
|
-
* @returns a promise that resolves to the added tag when the script's
|
812
|
-
* `onload` event fires or when the script content was injected into the
|
813
|
-
* frame.
|
814
|
-
*/
|
815
|
-
async addScriptTag(options) {
|
816
|
-
return this._mainWorld.addScriptTag(options);
|
817
|
-
}
|
818
|
-
/**
|
819
|
-
* Adds a `<link rel="stylesheet">` tag into the page with the desired url or
|
820
|
-
* a `<style type="text/css">` tag with the content.
|
821
|
-
*
|
822
|
-
* @param options - configure the CSS to add to the page.
|
823
|
-
*
|
824
|
-
* @returns a promise that resolves to the added tag when the stylesheets's
|
825
|
-
* `onload` event fires or when the CSS content was injected into the
|
826
|
-
* frame.
|
827
|
-
*/
|
828
|
-
async addStyleTag(options) {
|
829
|
-
return this._mainWorld.addStyleTag(options);
|
830
|
-
}
|
831
|
-
/**
|
832
|
-
*
|
833
|
-
* This method clicks the first element found that matches `selector`.
|
834
|
-
*
|
835
|
-
* @remarks
|
836
|
-
*
|
837
|
-
* This method scrolls the element into view if needed, and then uses
|
838
|
-
* {@link Page.mouse} to click in the center of the element. If there's no
|
839
|
-
* element matching `selector`, the method throws an error.
|
840
|
-
*
|
841
|
-
* Bear in mind that if `click()` triggers a navigation event and there's a
|
842
|
-
* separate `page.waitForNavigation()` promise to be resolved, you may end up
|
843
|
-
* with a race condition that yields unexpected results. The correct pattern
|
844
|
-
* for click and wait for navigation is the following:
|
845
|
-
*
|
846
|
-
* ```javascript
|
847
|
-
* const [response] = await Promise.all([
|
848
|
-
* page.waitForNavigation(waitOptions),
|
849
|
-
* frame.click(selector, clickOptions),
|
850
|
-
* ]);
|
851
|
-
* ```
|
852
|
-
* @param selector - the selector to search for to click. If there are
|
853
|
-
* multiple elements, the first will be clicked.
|
854
|
-
*/
|
855
|
-
async click(selector, options = {}) {
|
856
|
-
return this._secondaryWorld.click(selector, options);
|
857
|
-
}
|
858
|
-
/**
|
859
|
-
* This method fetches an element with `selector` and focuses it.
|
860
|
-
*
|
861
|
-
* @remarks
|
862
|
-
* If there's no element matching `selector`, the method throws an error.
|
863
|
-
*
|
864
|
-
* @param selector - the selector for the element to focus. If there are
|
865
|
-
* multiple elements, the first will be focused.
|
866
|
-
*/
|
867
|
-
async focus(selector) {
|
868
|
-
return this._secondaryWorld.focus(selector);
|
869
|
-
}
|
870
|
-
/**
|
871
|
-
* This method fetches an element with `selector`, scrolls it into view if
|
872
|
-
* needed, and then uses {@link Page.mouse} to hover over the center of the
|
873
|
-
* element.
|
874
|
-
*
|
875
|
-
* @remarks
|
876
|
-
* If there's no element matching `selector`, the method throws an
|
877
|
-
*
|
878
|
-
* @param selector - the selector for the element to hover. If there are
|
879
|
-
* multiple elements, the first will be hovered.
|
880
|
-
*/
|
881
|
-
async hover(selector) {
|
882
|
-
return this._secondaryWorld.hover(selector);
|
883
|
-
}
|
884
|
-
/**
|
885
|
-
* Triggers a `change` and `input` event once all the provided options have
|
886
|
-
* been selected.
|
887
|
-
*
|
888
|
-
* @remarks
|
889
|
-
*
|
890
|
-
* If there's no `<select>` element matching `selector`, the
|
891
|
-
* method throws an error.
|
892
|
-
*
|
893
|
-
* @example
|
894
|
-
* ```ts
|
895
|
-
* frame.select('select#colors', 'blue'); // single selection
|
896
|
-
* frame.select('select#colors', 'red', 'green', 'blue'); // multiple selections
|
897
|
-
* ```
|
898
|
-
*
|
899
|
-
* @param selector - a selector to query the frame for
|
900
|
-
* @param values - an array of values to select. If the `<select>` has the
|
901
|
-
* `multiple` attribute, all values are considered, otherwise only the first
|
902
|
-
* one is taken into account.
|
903
|
-
* @returns the list of values that were successfully selected.
|
904
|
-
*/
|
905
|
-
select(selector, ...values) {
|
906
|
-
return this._secondaryWorld.select(selector, ...values);
|
907
|
-
}
|
908
|
-
/**
|
909
|
-
* This method fetches an element with `selector`, scrolls it into view if
|
910
|
-
* needed, and then uses {@link Page.touchscreen} to tap in the center of the
|
911
|
-
* element.
|
912
|
-
*
|
913
|
-
* @remarks
|
914
|
-
*
|
915
|
-
* If there's no element matching `selector`, the method throws an error.
|
916
|
-
*
|
917
|
-
* @param selector - the selector to tap.
|
918
|
-
* @returns a promise that resolves when the element has been tapped.
|
919
|
-
*/
|
920
|
-
async tap(selector) {
|
921
|
-
return this._secondaryWorld.tap(selector);
|
922
|
-
}
|
923
|
-
/**
|
924
|
-
* Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character
|
925
|
-
* in the text.
|
926
|
-
*
|
927
|
-
* @remarks
|
928
|
-
* To press a special key, like `Control` or `ArrowDown`, use
|
929
|
-
* {@link Keyboard.press}.
|
930
|
-
*
|
931
|
-
* @example
|
932
|
-
* ```ts
|
933
|
-
* await frame.type('#mytextarea', 'Hello'); // Types instantly
|
934
|
-
* await frame.type('#mytextarea', 'World', {delay: 100}); // Types slower, like a user
|
935
|
-
* ```
|
936
|
-
*
|
937
|
-
* @param selector - the selector for the element to type into. If there are
|
938
|
-
* multiple the first will be used.
|
939
|
-
* @param text - text to type into the element
|
940
|
-
* @param options - takes one option, `delay`, which sets the time to wait
|
941
|
-
* between key presses in milliseconds. Defaults to `0`.
|
942
|
-
*
|
943
|
-
* @returns a promise that resolves when the typing is complete.
|
944
|
-
*/
|
945
|
-
async type(selector, text, options) {
|
946
|
-
return this._mainWorld.type(selector, text, options);
|
947
|
-
}
|
948
|
-
/**
|
949
|
-
* Causes your script to wait for the given number of milliseconds.
|
950
|
-
*
|
951
|
-
* @remarks
|
952
|
-
* It's generally recommended to not wait for a number of seconds, but instead
|
953
|
-
* use {@link Frame.waitForSelector}, {@link Frame.waitForXPath} or
|
954
|
-
* {@link Frame.waitForFunction} to wait for exactly the conditions you want.
|
955
|
-
*
|
956
|
-
* @example
|
957
|
-
*
|
958
|
-
* Wait for 1 second:
|
959
|
-
*
|
960
|
-
* ```
|
961
|
-
* await frame.waitForTimeout(1000);
|
962
|
-
* ```
|
963
|
-
*
|
964
|
-
* @param milliseconds - the number of milliseconds to wait.
|
965
|
-
*/
|
966
|
-
waitForTimeout(milliseconds) {
|
967
|
-
return new Promise(resolve => {
|
968
|
-
setTimeout(resolve, milliseconds);
|
969
|
-
});
|
970
|
-
}
|
971
|
-
/**
|
972
|
-
* @remarks
|
973
|
-
*
|
974
|
-
*
|
975
|
-
* Wait for the `selector` to appear in page. If at the moment of calling the
|
976
|
-
* method the `selector` already exists, the method will return immediately.
|
977
|
-
* If the selector doesn't appear after the `timeout` milliseconds of waiting,
|
978
|
-
* the function will throw.
|
979
|
-
*
|
980
|
-
* This method works across navigations.
|
981
|
-
*
|
982
|
-
* @example
|
983
|
-
* ```ts
|
984
|
-
* const puppeteer = require('puppeteer');
|
985
|
-
*
|
986
|
-
* (async () => {
|
987
|
-
* const browser = await puppeteer.launch();
|
988
|
-
* const page = await browser.newPage();
|
989
|
-
* let currentURL;
|
990
|
-
* page.mainFrame()
|
991
|
-
* .waitForSelector('img')
|
992
|
-
* .then(() => console.log('First URL with image: ' + currentURL));
|
993
|
-
*
|
994
|
-
* for (currentURL of ['https://example.com', 'https://google.com', 'https://bbc.com']) {
|
995
|
-
* await page.goto(currentURL);
|
996
|
-
* }
|
997
|
-
* await browser.close();
|
998
|
-
* })();
|
999
|
-
* ```
|
1000
|
-
* @param selector - the selector to wait for.
|
1001
|
-
* @param options - options to define if the element should be visible and how
|
1002
|
-
* long to wait before timing out.
|
1003
|
-
* @returns a promise which resolves when an element matching the selector
|
1004
|
-
* string is added to the DOM.
|
1005
|
-
*/
|
1006
|
-
async waitForSelector(selector, options = {}) {
|
1007
|
-
const handle = await this._secondaryWorld.waitForSelector(selector, options);
|
1008
|
-
if (!handle) {
|
1009
|
-
return null;
|
1010
|
-
}
|
1011
|
-
const mainExecutionContext = await this._mainWorld.executionContext();
|
1012
|
-
const result = await mainExecutionContext._adoptElementHandle(handle);
|
1013
|
-
await handle.dispose();
|
1014
|
-
return result;
|
1015
|
-
}
|
1016
|
-
/**
|
1017
|
-
* @remarks
|
1018
|
-
* Wait for the `xpath` to appear in page. If at the moment of calling the
|
1019
|
-
* method the `xpath` already exists, the method will return immediately. If
|
1020
|
-
* the xpath doesn't appear after the `timeout` milliseconds of waiting, the
|
1021
|
-
* function will throw.
|
1022
|
-
*
|
1023
|
-
* For a code example, see the example for {@link Frame.waitForSelector}. That
|
1024
|
-
* function behaves identically other than taking a CSS selector rather than
|
1025
|
-
* an XPath.
|
1026
|
-
*
|
1027
|
-
* @param xpath - the XPath expression to wait for.
|
1028
|
-
* @param options - options to configure the visiblity of the element and how
|
1029
|
-
* long to wait before timing out.
|
1030
|
-
*/
|
1031
|
-
async waitForXPath(xpath, options = {}) {
|
1032
|
-
const handle = await this._secondaryWorld.waitForXPath(xpath, options);
|
1033
|
-
if (!handle) {
|
1034
|
-
return null;
|
1035
|
-
}
|
1036
|
-
const mainExecutionContext = await this._mainWorld.executionContext();
|
1037
|
-
const result = await mainExecutionContext._adoptElementHandle(handle);
|
1038
|
-
await handle.dispose();
|
1039
|
-
return result;
|
1040
|
-
}
|
1041
|
-
/**
|
1042
|
-
* @remarks
|
1043
|
-
*
|
1044
|
-
* @example
|
1045
|
-
*
|
1046
|
-
* The `waitForFunction` can be used to observe viewport size change:
|
1047
|
-
* ```ts
|
1048
|
-
* const puppeteer = require('puppeteer');
|
1049
|
-
*
|
1050
|
-
* (async () => {
|
1051
|
-
* . const browser = await puppeteer.launch();
|
1052
|
-
* . const page = await browser.newPage();
|
1053
|
-
* . const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100');
|
1054
|
-
* . page.setViewport({width: 50, height: 50});
|
1055
|
-
* . await watchDog;
|
1056
|
-
* . await browser.close();
|
1057
|
-
* })();
|
1058
|
-
* ```
|
1059
|
-
*
|
1060
|
-
* To pass arguments from Node.js to the predicate of `page.waitForFunction` function:
|
1061
|
-
*
|
1062
|
-
* ```ts
|
1063
|
-
* const selector = '.foo';
|
1064
|
-
* await frame.waitForFunction(
|
1065
|
-
* selector => !!document.querySelector(selector),
|
1066
|
-
* {}, // empty options object
|
1067
|
-
* selector
|
1068
|
-
*);
|
1069
|
-
* ```
|
1070
|
-
*
|
1071
|
-
* @param pageFunction - the function to evaluate in the frame context.
|
1072
|
-
* @param options - options to configure the polling method and timeout.
|
1073
|
-
* @param args - arguments to pass to the `pageFunction`.
|
1074
|
-
* @returns the promise which resolve when the `pageFunction` returns a truthy value.
|
1075
|
-
*/
|
1076
|
-
waitForFunction(pageFunction, options = {}, ...args) {
|
1077
|
-
// TODO: Fix when NodeHandle has been added.
|
1078
|
-
return this._mainWorld.waitForFunction(pageFunction, options, ...args);
|
1079
|
-
}
|
1080
|
-
/**
|
1081
|
-
* @returns the frame's title.
|
1082
|
-
*/
|
1083
|
-
async title() {
|
1084
|
-
return this._secondaryWorld.title();
|
1085
|
-
}
|
1086
|
-
/**
|
1087
|
-
* @internal
|
1088
|
-
*/
|
1089
|
-
_navigated(framePayload) {
|
1090
|
-
this._name = framePayload.name;
|
1091
|
-
__classPrivateFieldSet(this, _Frame_url, `${framePayload.url}${framePayload.urlFragment || ''}`, "f");
|
1092
|
-
}
|
1093
|
-
/**
|
1094
|
-
* @internal
|
1095
|
-
*/
|
1096
|
-
_navigatedWithinDocument(url) {
|
1097
|
-
__classPrivateFieldSet(this, _Frame_url, url, "f");
|
1098
|
-
}
|
1099
|
-
/**
|
1100
|
-
* @internal
|
1101
|
-
*/
|
1102
|
-
_onLifecycleEvent(loaderId, name) {
|
1103
|
-
if (name === 'init') {
|
1104
|
-
this._loaderId = loaderId;
|
1105
|
-
this._lifecycleEvents.clear();
|
1106
|
-
}
|
1107
|
-
this._lifecycleEvents.add(name);
|
1108
|
-
}
|
1109
|
-
/**
|
1110
|
-
* @internal
|
1111
|
-
*/
|
1112
|
-
_onLoadingStopped() {
|
1113
|
-
this._lifecycleEvents.add('DOMContentLoaded');
|
1114
|
-
this._lifecycleEvents.add('load');
|
1115
|
-
}
|
1116
|
-
/**
|
1117
|
-
* @internal
|
1118
|
-
*/
|
1119
|
-
_onLoadingStarted() {
|
1120
|
-
this._hasStartedLoading = true;
|
1121
|
-
}
|
1122
|
-
/**
|
1123
|
-
* @internal
|
1124
|
-
*/
|
1125
|
-
_detach() {
|
1126
|
-
__classPrivateFieldSet(this, _Frame_detached, true, "f");
|
1127
|
-
this._mainWorld._detach();
|
1128
|
-
this._secondaryWorld._detach();
|
1129
|
-
if (__classPrivateFieldGet(this, _Frame_parentFrame, "f")) {
|
1130
|
-
__classPrivateFieldGet(this, _Frame_parentFrame, "f")._childFrames.delete(this);
|
1131
|
-
}
|
1132
|
-
__classPrivateFieldSet(this, _Frame_parentFrame, null, "f");
|
1133
|
-
}
|
1134
|
-
}
|
1135
|
-
exports.Frame = Frame;
|
1136
|
-
_Frame_parentFrame = new WeakMap(), _Frame_url = new WeakMap(), _Frame_detached = new WeakMap(), _Frame_client = new WeakMap();
|
1137
|
-
function assertNoLegacyNavigationOptions(options) {
|
1138
|
-
(0, assert_js_1.assert)(options['networkIdleTimeout'] === undefined, 'ERROR: networkIdleTimeout option is no longer supported.');
|
1139
|
-
(0, assert_js_1.assert)(options['networkIdleInflight'] === undefined, 'ERROR: networkIdleInflight option is no longer supported.');
|
1140
|
-
(0, assert_js_1.assert)(options['waitUntil'] !== 'networkidle', 'ERROR: "networkidle" option is no longer supported. Use "networkidle2" instead');
|
1141
|
-
}
|
1142
416
|
//# sourceMappingURL=FrameManager.js.map
|