brave-real-puppeteer-core 24.25.0 → 24.33.0-patch.1
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/README.md +5 -5
- package/advanced-stealth.js +1 -1
- package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
- package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/api/Browser.d.ts +111 -2
- package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Browser.js +4 -2
- package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/api/BrowserContext.d.ts +5 -3
- package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/CDPSession.js.map +1 -1
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +38 -0
- package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/ElementHandle.js +1 -1
- package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Frame.js +4 -4
- package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +1 -1
- package/lib/cjs/puppeteer/api/Page.d.ts +41 -7
- package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/lib/cjs/puppeteer/api/api.d.ts +2 -0
- package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/lib/cjs/puppeteer/api/api.js +1 -0
- package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
- package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/bidi/Browser.d.ts +6 -1
- package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Browser.js +36 -14
- package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
- package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +3 -3
- package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/BrowserContext.js +6 -3
- package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
- package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Connection.js +19 -2
- package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
- package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -1
- package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Frame.js +3 -2
- package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/HTTPRequest.js +2 -29
- package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/Page.d.ts +10 -8
- package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/Page.js +63 -47
- package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +55 -2
- package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Request.d.ts +1 -0
- package/lib/cjs/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/core/Request.js +30 -4
- package/lib/cjs/puppeteer/bidi/core/Request.js.map +1 -1
- package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/lib/cjs/puppeteer/bidi/util.js +7 -0
- package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +10 -0
- package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Accessibility.js +30 -3
- package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
- package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/lib/cjs/puppeteer/cdp/Browser.d.ts +10 -5
- package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Browser.js +61 -8
- package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -2
- package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +3 -2
- package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/BrowserContext.js +4 -4
- package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
- package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
- package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
- package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +10 -76
- package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/EmulationManager.js +22 -0
- package/lib/cjs/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPRequest.js +6 -2
- package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPResponse.js +1 -1
- package/lib/cjs/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/lib/cjs/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.js +25 -1
- package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/Page.d.ts +9 -4
- package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/Page.js +30 -7
- package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
- package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
- package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/lib/cjs/puppeteer/cdp/utils.d.ts +2 -2
- package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/BrowserConnector.js +47 -3
- package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
- package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +22 -0
- package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/BrowserLauncher.js +10 -4
- package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
- package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
- package/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -1
- package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/lib/cjs/puppeteer/revisions.js +3 -3
- package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
- package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/lib/cjs/puppeteer/util/util.js +1 -0
- package/lib/cjs/puppeteer/util/util.js.map +1 -1
- package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/lib/cjs/puppeteer/util/version.js +1 -1
- package/lib/es5-iife/puppeteer-core-browser.d.ts +304 -22
- package/lib/es5-iife/puppeteer-core-browser.js +484 -224
- package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
- package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/api/Browser.d.ts +111 -2
- package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Browser.js +4 -2
- package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/lib/esm/puppeteer/api/BrowserContext.d.ts +5 -3
- package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/CDPSession.js.map +1 -1
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +62 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +34 -0
- package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/ElementHandle.js +1 -1
- package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Frame.js +4 -4
- package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/lib/esm/puppeteer/api/HTTPRequest.d.ts +1 -1
- package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Page.d.ts +41 -7
- package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/lib/esm/puppeteer/api/api.d.ts +2 -0
- package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/lib/esm/puppeteer/api/api.js +1 -0
- package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
- package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/bidi/Browser.d.ts +6 -1
- package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Browser.js +36 -14
- package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
- package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +3 -3
- package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/BrowserContext.js +6 -3
- package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
- package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Connection.js +19 -2
- package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
- package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -1
- package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Frame.js +3 -2
- package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/HTTPRequest.js +2 -29
- package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/lib/esm/puppeteer/bidi/Page.d.ts +10 -8
- package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/Page.js +64 -48
- package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +8 -0
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +55 -2
- package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Request.d.ts +1 -0
- package/lib/esm/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/core/Request.js +31 -5
- package/lib/esm/puppeteer/bidi/core/Request.js.map +1 -1
- package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/lib/esm/puppeteer/bidi/util.js +7 -0
- package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Accessibility.d.ts +10 -0
- package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Accessibility.js +30 -3
- package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
- package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/lib/esm/puppeteer/cdp/Browser.d.ts +10 -5
- package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Browser.js +61 -8
- package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -2
- package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +3 -2
- package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/BrowserContext.js +4 -4
- package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
- package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
- package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Connection.js +11 -2
- package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +5 -64
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +7 -72
- package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/lib/esm/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/EmulationManager.js +22 -0
- package/lib/esm/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
- package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/HTTPRequest.js +6 -2
- package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/lib/esm/puppeteer/cdp/HTTPResponse.js +1 -1
- package/lib/esm/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/lib/esm/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.js +25 -1
- package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/Page.d.ts +9 -4
- package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/Page.js +30 -7
- package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
- package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
- package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/lib/esm/puppeteer/cdp/utils.d.ts +2 -2
- package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/BrowserConnector.js +48 -4
- package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
- package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/lib/esm/puppeteer/common/ConnectOptions.d.ts +22 -0
- package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/BrowserLauncher.js +10 -4
- package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
- package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
- package/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -1
- package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/lib/esm/puppeteer/revisions.js +3 -3
- package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/lib/esm/puppeteer/util/util.js +1 -0
- package/lib/esm/puppeteer/util/util.js.map +1 -1
- package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/lib/esm/puppeteer/util/version.js +1 -1
- package/lib/types.d.ts +304 -22
- package/package.json +15 -15
- package/src/api/BluetoothEmulation.ts +103 -0
- package/src/api/Browser.ts +130 -3
- package/src/api/BrowserContext.ts +10 -3
- package/src/api/CDPSession.ts +1 -2
- package/src/api/DeviceRequestPrompt.ts +71 -0
- package/src/api/ElementHandle.ts +3 -5
- package/src/api/Frame.ts +7 -9
- package/src/api/HTTPRequest.ts +1 -1
- package/src/api/Page.ts +48 -11
- package/src/api/api.ts +2 -0
- package/src/bidi/BidiOverCdp.ts +1 -0
- package/src/bidi/BluetoothEmulation.ts +52 -0
- package/src/bidi/Browser.ts +52 -14
- package/src/bidi/BrowserConnector.ts +8 -1
- package/src/bidi/BrowserContext.ts +9 -6
- package/src/bidi/Connection.ts +20 -1
- package/src/bidi/DeviceRequestPrompt.ts +138 -0
- package/src/bidi/Frame.ts +7 -3
- package/src/bidi/HTTPRequest.ts +2 -45
- package/src/bidi/Page.ts +86 -71
- package/src/bidi/core/BrowsingContext.ts +80 -2
- package/src/bidi/core/Connection.ts +3 -2
- package/src/bidi/core/Request.ts +35 -5
- package/src/bidi/util.ts +8 -0
- package/src/cdp/Accessibility.ts +45 -4
- package/src/cdp/BluetoothEmulation.ts +47 -0
- package/src/cdp/Browser.ts +95 -10
- package/src/cdp/BrowserConnector.ts +4 -0
- package/src/cdp/BrowserContext.ts +5 -4
- package/src/cdp/CdpSession.ts +3 -2
- package/src/cdp/Connection.ts +15 -1
- package/src/cdp/DeviceRequestPrompt.ts +8 -79
- package/src/cdp/EmulationManager.ts +30 -0
- package/src/cdp/ExecutionContext.ts +6 -2
- package/src/cdp/ExtensionTransport.ts +5 -1
- package/src/cdp/Frame.ts +3 -5
- package/src/cdp/FrameManager.ts +9 -4
- package/src/cdp/HTTPRequest.ts +7 -2
- package/src/cdp/HTTPResponse.ts +1 -1
- package/src/cdp/JSHandle.ts +1 -1
- package/src/cdp/NetworkEventManager.ts +16 -1
- package/src/cdp/NetworkManager.ts +31 -1
- package/src/cdp/Page.ts +49 -14
- package/src/cdp/TargetManager.ts +36 -43
- package/src/cdp/WebWorker.ts +8 -3
- package/src/cdp/cdp.ts +1 -0
- package/src/cdp/utils.ts +2 -2
- package/src/common/BrowserConnector.ts +67 -4
- package/src/common/CallbackRegistry.ts +7 -5
- package/src/common/ConnectOptions.ts +28 -0
- package/src/common/ConsoleMessage.ts +14 -0
- package/src/common/EventEmitter.ts +3 -3
- package/src/node/BrowserLauncher.ts +22 -1
- package/src/node/ChromeLauncher.ts +5 -17
- package/src/node/LaunchOptions.ts +23 -7
- package/src/revisions.ts +3 -3
- package/src/util/disposable.ts +2 -2
- package/src/util/util.ts +1 -0
- package/src/util/version.ts +1 -1
- package/src/templates/version.ts.tmpl +0 -4
package/src/cdp/Browser.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type {ChildProcess} from 'node:child_process';
|
|
|
8
8
|
|
|
9
9
|
import type {Protocol} from 'devtools-protocol';
|
|
10
10
|
|
|
11
|
-
import type {DebugInfo} from '../api/Browser.js';
|
|
11
|
+
import type {CreatePageOptions, DebugInfo} from '../api/Browser.js';
|
|
12
12
|
import {
|
|
13
13
|
Browser as BrowserBase,
|
|
14
14
|
BrowserEvent,
|
|
@@ -16,6 +16,10 @@ import {
|
|
|
16
16
|
type BrowserContextOptions,
|
|
17
17
|
type IsPageTargetCallback,
|
|
18
18
|
type TargetFilterCallback,
|
|
19
|
+
type ScreenInfo,
|
|
20
|
+
type AddScreenParams,
|
|
21
|
+
type WindowBounds,
|
|
22
|
+
type WindowId,
|
|
19
23
|
} from '../api/Browser.js';
|
|
20
24
|
import {BrowserContextEvent} from '../api/BrowserContext.js';
|
|
21
25
|
import {CDPSessionEvent} from '../api/CDPSession.js';
|
|
@@ -196,7 +200,9 @@ export class CdpBrowser extends BrowserBase {
|
|
|
196
200
|
target.type() === 'webview' ||
|
|
197
201
|
(this.#handleDevToolsAsPage &&
|
|
198
202
|
target.type() === 'other' &&
|
|
199
|
-
target
|
|
203
|
+
target
|
|
204
|
+
.url()
|
|
205
|
+
.startsWith('devtools://devtools/bundled/devtools_app.html'))
|
|
200
206
|
);
|
|
201
207
|
});
|
|
202
208
|
}
|
|
@@ -343,19 +349,30 @@ export class CdpBrowser extends BrowserBase {
|
|
|
343
349
|
return this.#connection.url();
|
|
344
350
|
}
|
|
345
351
|
|
|
346
|
-
override async newPage(): Promise<Page> {
|
|
347
|
-
return await this.#defaultContext.newPage();
|
|
352
|
+
override async newPage(options?: CreatePageOptions): Promise<Page> {
|
|
353
|
+
return await this.#defaultContext.newPage(options);
|
|
348
354
|
}
|
|
349
355
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
+
async _createPageInContext(
|
|
357
|
+
contextId?: string,
|
|
358
|
+
options?: CreatePageOptions,
|
|
359
|
+
): Promise<Page> {
|
|
360
|
+
const hasTargets =
|
|
361
|
+
this.targets().filter(t => {
|
|
362
|
+
return t.browserContext().id === contextId;
|
|
363
|
+
}).length > 0;
|
|
364
|
+
const windowBounds =
|
|
365
|
+
options?.type === 'window' ? options.windowBounds : undefined;
|
|
356
366
|
const {targetId} = await this.#connection.send('Target.createTarget', {
|
|
357
367
|
url: 'about:blank',
|
|
358
368
|
browserContextId: contextId || undefined,
|
|
369
|
+
left: windowBounds?.left,
|
|
370
|
+
top: windowBounds?.top,
|
|
371
|
+
width: windowBounds?.width,
|
|
372
|
+
height: windowBounds?.height,
|
|
373
|
+
windowState: windowBounds?.windowState,
|
|
374
|
+
// Works around crbug.com/454825274.
|
|
375
|
+
newWindow: hasTargets && options?.type === 'window' ? true : undefined,
|
|
359
376
|
});
|
|
360
377
|
const target = (await this.waitForTarget(t => {
|
|
361
378
|
return (t as CdpTarget)._targetId === targetId;
|
|
@@ -378,6 +395,38 @@ export class CdpBrowser extends BrowserBase {
|
|
|
378
395
|
return page;
|
|
379
396
|
}
|
|
380
397
|
|
|
398
|
+
async _createDevToolsPage(pageTargetId: string): Promise<Page> {
|
|
399
|
+
const openDevToolsResponse = await this.#connection.send(
|
|
400
|
+
'Target.openDevTools',
|
|
401
|
+
{
|
|
402
|
+
targetId: pageTargetId,
|
|
403
|
+
},
|
|
404
|
+
);
|
|
405
|
+
const target = (await this.waitForTarget(t => {
|
|
406
|
+
return (t as CdpTarget)._targetId === openDevToolsResponse.targetId;
|
|
407
|
+
})) as CdpTarget;
|
|
408
|
+
if (!target) {
|
|
409
|
+
throw new Error(
|
|
410
|
+
`Missing target for DevTools page (id = ${pageTargetId})`,
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
const initialized =
|
|
414
|
+
(await target._initializedDeferred.valueOrThrow()) ===
|
|
415
|
+
InitializationStatus.SUCCESS;
|
|
416
|
+
if (!initialized) {
|
|
417
|
+
throw new Error(
|
|
418
|
+
`Failed to create target for DevTools page (id = ${pageTargetId})`,
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
const page = await target.page();
|
|
422
|
+
if (!page) {
|
|
423
|
+
throw new Error(
|
|
424
|
+
`Failed to create a DevTools Page for target (id = ${pageTargetId})`,
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
return page;
|
|
428
|
+
}
|
|
429
|
+
|
|
381
430
|
override async installExtension(path: string): Promise<string> {
|
|
382
431
|
const {id} = await this.#connection.send('Extensions.loadUnpacked', {path});
|
|
383
432
|
return id;
|
|
@@ -387,6 +436,42 @@ export class CdpBrowser extends BrowserBase {
|
|
|
387
436
|
return this.#connection.send('Extensions.uninstall', {id});
|
|
388
437
|
}
|
|
389
438
|
|
|
439
|
+
override async screens(): Promise<ScreenInfo[]> {
|
|
440
|
+
const {screenInfos} = await this.#connection.send(
|
|
441
|
+
'Emulation.getScreenInfos',
|
|
442
|
+
);
|
|
443
|
+
return screenInfos;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
override async addScreen(params: AddScreenParams): Promise<ScreenInfo> {
|
|
447
|
+
const {screenInfo} = await this.#connection.send(
|
|
448
|
+
'Emulation.addScreen',
|
|
449
|
+
params,
|
|
450
|
+
);
|
|
451
|
+
return screenInfo;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
override async removeScreen(screenId: string): Promise<void> {
|
|
455
|
+
return await this.#connection.send('Emulation.removeScreen', {screenId});
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
override async getWindowBounds(windowId: WindowId): Promise<WindowBounds> {
|
|
459
|
+
const {bounds} = await this.#connection.send('Browser.getWindowBounds', {
|
|
460
|
+
windowId: Number(windowId),
|
|
461
|
+
});
|
|
462
|
+
return bounds;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
override async setWindowBounds(
|
|
466
|
+
windowId: WindowId,
|
|
467
|
+
windowBounds: WindowBounds,
|
|
468
|
+
): Promise<void> {
|
|
469
|
+
await this.#connection.send('Browser.setWindowBounds', {
|
|
470
|
+
windowId: Number(windowId),
|
|
471
|
+
bounds: windowBounds,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
|
|
390
475
|
override targets(): CdpTarget[] {
|
|
391
476
|
return Array.from(
|
|
392
477
|
this.#targetManager.getAvailableTargets().values(),
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type {ConnectionTransport} from '../common/ConnectionTransport.js';
|
|
8
8
|
import type {ConnectOptions} from '../common/ConnectOptions.js';
|
|
9
9
|
import {debugError, DEFAULT_VIEWPORT} from '../common/util.js';
|
|
10
|
+
import {createIncrementalIdGenerator} from '../util/incremental-id-generator.js';
|
|
10
11
|
|
|
11
12
|
import {CdpBrowser} from './Browser.js';
|
|
12
13
|
import {Connection} from './Connection.js';
|
|
@@ -32,6 +33,7 @@ export async function _connectToCdpBrowser(
|
|
|
32
33
|
slowMo = 0,
|
|
33
34
|
protocolTimeout,
|
|
34
35
|
handleDevToolsAsPage,
|
|
36
|
+
idGenerator = createIncrementalIdGenerator(),
|
|
35
37
|
} = options;
|
|
36
38
|
|
|
37
39
|
const connection = new Connection(
|
|
@@ -39,6 +41,8 @@ export async function _connectToCdpBrowser(
|
|
|
39
41
|
connectionTransport,
|
|
40
42
|
slowMo,
|
|
41
43
|
protocolTimeout,
|
|
44
|
+
/* rawErrors */ false,
|
|
45
|
+
idGenerator,
|
|
42
46
|
);
|
|
43
47
|
|
|
44
48
|
const {browserContextIds} = await connection.send(
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type {CreatePageOptions} from '../api/Browser.js';
|
|
7
8
|
import {
|
|
8
9
|
WEB_PERMISSION_TO_PROTOCOL_PERMISSION,
|
|
9
10
|
type Permission,
|
|
@@ -44,13 +45,13 @@ export class CdpBrowserContext extends BrowserContext {
|
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
override async pages(): Promise<Page[]> {
|
|
48
|
+
override async pages(includeAll = false): Promise<Page[]> {
|
|
48
49
|
const pages = await Promise.all(
|
|
49
50
|
this.targets()
|
|
50
51
|
.filter(target => {
|
|
51
52
|
return (
|
|
52
53
|
target.type() === 'page' ||
|
|
53
|
-
(target.type() === 'other' &&
|
|
54
|
+
((target.type() === 'other' || includeAll) &&
|
|
54
55
|
this.#browser._getIsPageTargetCallback()?.(target))
|
|
55
56
|
);
|
|
56
57
|
})
|
|
@@ -88,9 +89,9 @@ export class CdpBrowserContext extends BrowserContext {
|
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
override async newPage(): Promise<Page> {
|
|
92
|
+
override async newPage(options?: CreatePageOptions): Promise<Page> {
|
|
92
93
|
using _guard = await this.waitForScreenshotOperations();
|
|
93
|
-
return await this.#browser._createPageInContext(this.#id);
|
|
94
|
+
return await this.#browser._createPageInContext(this.#id, options);
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
override browser(): CdpBrowser {
|
package/src/cdp/CdpSession.ts
CHANGED
|
@@ -27,7 +27,7 @@ import type {CdpTarget} from './Target.js';
|
|
|
27
27
|
export class CdpCDPSession extends CDPSession {
|
|
28
28
|
#sessionId: string;
|
|
29
29
|
#targetType: string;
|
|
30
|
-
#callbacks
|
|
30
|
+
#callbacks: CallbackRegistry;
|
|
31
31
|
#connection: Connection;
|
|
32
32
|
#parentSessionId?: string;
|
|
33
33
|
#target?: CdpTarget;
|
|
@@ -46,6 +46,7 @@ export class CdpCDPSession extends CDPSession {
|
|
|
46
46
|
super();
|
|
47
47
|
this.#connection = connection;
|
|
48
48
|
this.#targetType = targetType;
|
|
49
|
+
this.#callbacks = new CallbackRegistry(connection._idGenerator);
|
|
49
50
|
this.#sessionId = sessionId;
|
|
50
51
|
this.#parentSessionId = parentSessionId;
|
|
51
52
|
this.#rawErrors = rawErrors;
|
|
@@ -70,7 +71,7 @@ export class CdpCDPSession extends CDPSession {
|
|
|
70
71
|
return this.#target;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
override connection(): Connection
|
|
74
|
+
override connection(): Connection {
|
|
74
75
|
return this.#connection;
|
|
75
76
|
}
|
|
76
77
|
|
package/src/cdp/Connection.ts
CHANGED
|
@@ -19,6 +19,10 @@ import {debug} from '../common/Debug.js';
|
|
|
19
19
|
import {ConnectionClosedError, TargetCloseError} from '../common/Errors.js';
|
|
20
20
|
import {EventEmitter} from '../common/EventEmitter.js';
|
|
21
21
|
import {createProtocolErrorMessage} from '../util/ErrorLike.js';
|
|
22
|
+
import {
|
|
23
|
+
createIncrementalIdGenerator,
|
|
24
|
+
type GetIdFn,
|
|
25
|
+
} from '../util/incremental-id-generator.js';
|
|
22
26
|
|
|
23
27
|
import {CdpCDPSession} from './CdpSession.js';
|
|
24
28
|
|
|
@@ -38,6 +42,7 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
38
42
|
#manuallyAttached = new Set<string>();
|
|
39
43
|
#callbacks: CallbackRegistry;
|
|
40
44
|
#rawErrors = false;
|
|
45
|
+
#idGenerator: GetIdFn;
|
|
41
46
|
|
|
42
47
|
constructor(
|
|
43
48
|
url: string,
|
|
@@ -45,10 +50,12 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
45
50
|
delay = 0,
|
|
46
51
|
timeout?: number,
|
|
47
52
|
rawErrors = false,
|
|
53
|
+
idGenerator: () => number = createIncrementalIdGenerator(),
|
|
48
54
|
) {
|
|
49
55
|
super();
|
|
50
56
|
this.#rawErrors = rawErrors;
|
|
51
|
-
this.#
|
|
57
|
+
this.#idGenerator = idGenerator;
|
|
58
|
+
this.#callbacks = new CallbackRegistry(idGenerator);
|
|
52
59
|
this.#url = url;
|
|
53
60
|
this.#delay = delay;
|
|
54
61
|
this.#timeout = timeout ?? 180_000;
|
|
@@ -80,6 +87,13 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
80
87
|
return this.#closed;
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
get _idGenerator(): GetIdFn {
|
|
94
|
+
return this.#idGenerator;
|
|
95
|
+
}
|
|
96
|
+
|
|
83
97
|
/**
|
|
84
98
|
* @internal
|
|
85
99
|
*/
|
|
@@ -7,59 +7,17 @@
|
|
|
7
7
|
import type Protocol from 'devtools-protocol';
|
|
8
8
|
|
|
9
9
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
10
|
+
import {DeviceRequestPrompt} from '../api/DeviceRequestPrompt.js';
|
|
11
|
+
import type {DeviceRequestPromptDevice} from '../api/DeviceRequestPrompt.js';
|
|
10
12
|
import type {WaitTimeoutOptions} from '../api/Page.js';
|
|
11
13
|
import type {TimeoutSettings} from '../common/TimeoutSettings.js';
|
|
12
14
|
import {assert} from '../util/assert.js';
|
|
13
15
|
import {Deferred} from '../util/Deferred.js';
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export class DeviceRequestPromptDevice {
|
|
21
|
-
/**
|
|
22
|
-
* Device id during a prompt.
|
|
23
|
-
*/
|
|
24
|
-
id: string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Device name as it appears in a prompt.
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
constructor(id: string, name: string) {
|
|
35
|
-
this.id = id;
|
|
36
|
-
this.name = name;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Device request prompts let you respond to the page requesting for a device
|
|
42
|
-
* through an API like WebBluetooth.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* `DeviceRequestPrompt` instances are returned via the
|
|
46
|
-
* {@link Page.waitForDevicePrompt} method.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
*
|
|
50
|
-
* ```ts
|
|
51
|
-
* const [devicePrompt] = Promise.all([
|
|
52
|
-
* page.waitForDevicePrompt(),
|
|
53
|
-
* page.click('#connect-bluetooth'),
|
|
54
|
-
* ]);
|
|
55
|
-
* await devicePrompt.select(
|
|
56
|
-
* await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
|
|
57
|
-
* );
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* @public
|
|
18
|
+
* @internal
|
|
61
19
|
*/
|
|
62
|
-
export class DeviceRequestPrompt {
|
|
20
|
+
export class CdpDeviceRequestPrompt extends DeviceRequestPrompt {
|
|
63
21
|
#client: CDPSession | null;
|
|
64
22
|
#timeoutSettings: TimeoutSettings;
|
|
65
23
|
#id: string;
|
|
@@ -70,19 +28,12 @@ export class DeviceRequestPrompt {
|
|
|
70
28
|
promise: Deferred<DeviceRequestPromptDevice>;
|
|
71
29
|
}>();
|
|
72
30
|
|
|
73
|
-
/**
|
|
74
|
-
* Current list of selectable devices.
|
|
75
|
-
*/
|
|
76
|
-
devices: DeviceRequestPromptDevice[] = [];
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
31
|
constructor(
|
|
82
32
|
client: CDPSession,
|
|
83
33
|
timeoutSettings: TimeoutSettings,
|
|
84
34
|
firstEvent: Protocol.DeviceAccess.DeviceRequestPromptedEvent,
|
|
85
35
|
) {
|
|
36
|
+
super();
|
|
86
37
|
this.#client = client;
|
|
87
38
|
this.#timeoutSettings = timeoutSettings;
|
|
88
39
|
this.#id = firstEvent.id;
|
|
@@ -112,10 +63,7 @@ export class DeviceRequestPrompt {
|
|
|
112
63
|
continue;
|
|
113
64
|
}
|
|
114
65
|
|
|
115
|
-
const newDevice =
|
|
116
|
-
rawDevice.id,
|
|
117
|
-
rawDevice.name,
|
|
118
|
-
);
|
|
66
|
+
const newDevice = {id: rawDevice.id, name: rawDevice.name};
|
|
119
67
|
this.devices.push(newDevice);
|
|
120
68
|
|
|
121
69
|
for (const waitForDevicePromise of this.#waitForDevicePromises) {
|
|
@@ -126,9 +74,6 @@ export class DeviceRequestPrompt {
|
|
|
126
74
|
}
|
|
127
75
|
}
|
|
128
76
|
|
|
129
|
-
/**
|
|
130
|
-
* Resolve to the first device in the prompt matching a filter.
|
|
131
|
-
*/
|
|
132
77
|
async waitForDevice(
|
|
133
78
|
filter: (device: DeviceRequestPromptDevice) => boolean,
|
|
134
79
|
options: WaitTimeoutOptions = {},
|
|
@@ -164,9 +109,6 @@ export class DeviceRequestPrompt {
|
|
|
164
109
|
}
|
|
165
110
|
}
|
|
166
111
|
|
|
167
|
-
/**
|
|
168
|
-
* Select a device in the prompt's list.
|
|
169
|
-
*/
|
|
170
112
|
async select(device: DeviceRequestPromptDevice): Promise<void> {
|
|
171
113
|
assert(
|
|
172
114
|
this.#client !== null,
|
|
@@ -188,9 +130,6 @@ export class DeviceRequestPrompt {
|
|
|
188
130
|
});
|
|
189
131
|
}
|
|
190
132
|
|
|
191
|
-
/**
|
|
192
|
-
* Cancel the prompt.
|
|
193
|
-
*/
|
|
194
133
|
async cancel(): Promise<void> {
|
|
195
134
|
assert(
|
|
196
135
|
this.#client !== null,
|
|
@@ -212,14 +151,11 @@ export class DeviceRequestPrompt {
|
|
|
212
151
|
/**
|
|
213
152
|
* @internal
|
|
214
153
|
*/
|
|
215
|
-
export class
|
|
154
|
+
export class CdpDeviceRequestPromptManager {
|
|
216
155
|
#client: CDPSession | null;
|
|
217
156
|
#timeoutSettings: TimeoutSettings;
|
|
218
157
|
#deviceRequestPromptDeferreds = new Set<Deferred<DeviceRequestPrompt>>();
|
|
219
158
|
|
|
220
|
-
/**
|
|
221
|
-
* @internal
|
|
222
|
-
*/
|
|
223
159
|
constructor(client: CDPSession, timeoutSettings: TimeoutSettings) {
|
|
224
160
|
this.#client = client;
|
|
225
161
|
this.#timeoutSettings = timeoutSettings;
|
|
@@ -232,10 +168,6 @@ export class DeviceRequestPromptManager {
|
|
|
232
168
|
});
|
|
233
169
|
}
|
|
234
170
|
|
|
235
|
-
/**
|
|
236
|
-
* Wait for device prompt created by an action like calling WebBluetooth's
|
|
237
|
-
* requestDevice.
|
|
238
|
-
*/
|
|
239
171
|
async waitForDevicePrompt(
|
|
240
172
|
options: WaitTimeoutOptions = {},
|
|
241
173
|
): Promise<DeviceRequestPrompt> {
|
|
@@ -277,9 +209,6 @@ export class DeviceRequestPromptManager {
|
|
|
277
209
|
}
|
|
278
210
|
}
|
|
279
211
|
|
|
280
|
-
/**
|
|
281
|
-
* @internal
|
|
282
|
-
*/
|
|
283
212
|
#onDeviceRequestPrompted(
|
|
284
213
|
event: Protocol.DeviceAccess.DeviceRequestPromptedEvent,
|
|
285
214
|
) {
|
|
@@ -288,7 +217,7 @@ export class DeviceRequestPromptManager {
|
|
|
288
217
|
}
|
|
289
218
|
|
|
290
219
|
assert(this.#client !== null);
|
|
291
|
-
const devicePrompt = new
|
|
220
|
+
const devicePrompt = new CdpDeviceRequestPrompt(
|
|
292
221
|
this.#client,
|
|
293
222
|
this.#timeoutSettings,
|
|
294
223
|
event,
|
|
@@ -66,6 +66,11 @@ interface JavascriptEnabledState {
|
|
|
66
66
|
active: boolean;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
interface FocusState {
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
active: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
/**
|
|
70
75
|
* @internal
|
|
71
76
|
*/
|
|
@@ -193,6 +198,14 @@ export class EmulationManager implements ClientProvider {
|
|
|
193
198
|
this,
|
|
194
199
|
this.#setJavaScriptEnabled,
|
|
195
200
|
);
|
|
201
|
+
#focusState = new EmulatedState<FocusState>(
|
|
202
|
+
{
|
|
203
|
+
enabled: true,
|
|
204
|
+
active: false,
|
|
205
|
+
},
|
|
206
|
+
this,
|
|
207
|
+
this.#emulateFocus,
|
|
208
|
+
);
|
|
196
209
|
|
|
197
210
|
#secondaryClients = new Set<CDPSession>();
|
|
198
211
|
|
|
@@ -578,4 +591,21 @@ export class EmulationManager implements ClientProvider {
|
|
|
578
591
|
javaScriptEnabled: enabled,
|
|
579
592
|
});
|
|
580
593
|
}
|
|
594
|
+
|
|
595
|
+
@invokeAtMostOnceForArguments
|
|
596
|
+
async #emulateFocus(client: CDPSession, state: FocusState): Promise<void> {
|
|
597
|
+
if (!state.active) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
await client.send('Emulation.setFocusEmulationEnabled', {
|
|
601
|
+
enabled: state.enabled,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
async emulateFocus(enabled: boolean): Promise<void> {
|
|
606
|
+
await this.#focusState.setState({
|
|
607
|
+
active: true,
|
|
608
|
+
enabled,
|
|
609
|
+
});
|
|
610
|
+
}
|
|
581
611
|
}
|
|
@@ -597,7 +597,9 @@ export class ExecutionContext
|
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
if (returnByValue) {
|
|
600
|
-
return valueFromRemoteObject(remoteObject)
|
|
600
|
+
return valueFromRemoteObject(remoteObject) as HandleFor<
|
|
601
|
+
Awaited<ReturnType<Func>>
|
|
602
|
+
>;
|
|
601
603
|
}
|
|
602
604
|
|
|
603
605
|
return this.#world.createCdpHandle(remoteObject) as HandleFor<
|
|
@@ -649,7 +651,9 @@ export class ExecutionContext
|
|
|
649
651
|
}
|
|
650
652
|
|
|
651
653
|
if (returnByValue) {
|
|
652
|
-
return valueFromRemoteObject(remoteObject)
|
|
654
|
+
return valueFromRemoteObject(remoteObject) as unknown as HandleFor<
|
|
655
|
+
Awaited<ReturnType<Func>>
|
|
656
|
+
>;
|
|
653
657
|
}
|
|
654
658
|
|
|
655
659
|
return this.#world.createCdpHandle(remoteObject) as HandleFor<
|
|
@@ -68,7 +68,10 @@ export class ExtensionTransport implements ConnectionTransport {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
#dispatchResponse(message: object): void {
|
|
71
|
-
|
|
71
|
+
// Dispatch in a new task like other transports.
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
this.onmessage?.(JSON.stringify(message));
|
|
74
|
+
}, 0);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
send(message: string): void {
|
|
@@ -125,6 +128,7 @@ export class ExtensionTransport implements ConnectionTransport {
|
|
|
125
128
|
if (parsed.sessionId === 'tabTargetSessionId') {
|
|
126
129
|
this.#dispatchResponse({
|
|
127
130
|
method: 'Target.attachedToTarget',
|
|
131
|
+
sessionId: 'tabTargetSessionId',
|
|
128
132
|
params: {
|
|
129
133
|
targetInfo: pageTargetInfo,
|
|
130
134
|
sessionId: 'pageTargetSessionId',
|
package/src/cdp/Frame.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type {Protocol} from 'devtools-protocol';
|
|
8
8
|
|
|
9
9
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
10
|
+
import type {DeviceRequestPrompt} from '../api/DeviceRequestPrompt.js';
|
|
10
11
|
import type {ElementHandle} from '../api/ElementHandle.js';
|
|
11
12
|
import type {WaitForOptions} from '../api/Frame.js';
|
|
12
13
|
import {Frame, FrameEvent, throwIfDetached} from '../api/Frame.js';
|
|
@@ -21,10 +22,7 @@ import {isErrorLike} from '../util/ErrorLike.js';
|
|
|
21
22
|
import {Accessibility} from './Accessibility.js';
|
|
22
23
|
import type {Binding} from './Binding.js';
|
|
23
24
|
import type {CdpPreloadScript} from './CdpPreloadScript.js';
|
|
24
|
-
import type {
|
|
25
|
-
DeviceRequestPrompt,
|
|
26
|
-
DeviceRequestPromptManager,
|
|
27
|
-
} from './DeviceRequestPrompt.js';
|
|
25
|
+
import type {CdpDeviceRequestPromptManager} from './DeviceRequestPrompt.js';
|
|
28
26
|
import type {FrameManager} from './FrameManager.js';
|
|
29
27
|
import {FrameManagerEvent} from './FrameManagerEvents.js';
|
|
30
28
|
import type {IsolatedWorldChart} from './IsolatedWorld.js';
|
|
@@ -317,7 +315,7 @@ export class CdpFrame extends Frame {
|
|
|
317
315
|
return this._frameManager._frameTree.childFrames(this._id);
|
|
318
316
|
}
|
|
319
317
|
|
|
320
|
-
#deviceRequestPromptManager():
|
|
318
|
+
#deviceRequestPromptManager(): CdpDeviceRequestPromptManager {
|
|
321
319
|
return this._frameManager._deviceRequestPromptManager(this.#client);
|
|
322
320
|
}
|
|
323
321
|
|
package/src/cdp/FrameManager.ts
CHANGED
|
@@ -21,7 +21,7 @@ import type {Binding} from './Binding.js';
|
|
|
21
21
|
import {CdpPreloadScript} from './CdpPreloadScript.js';
|
|
22
22
|
import type {CdpCDPSession} from './CdpSession.js';
|
|
23
23
|
import {isTargetClosedError} from './Connection.js';
|
|
24
|
-
import {
|
|
24
|
+
import {CdpDeviceRequestPromptManager} from './DeviceRequestPrompt.js';
|
|
25
25
|
import {ExecutionContext} from './ExecutionContext.js';
|
|
26
26
|
import {CdpFrame} from './Frame.js';
|
|
27
27
|
import type {FrameManagerEvents} from './FrameManagerEvents.js';
|
|
@@ -60,7 +60,7 @@ export class FrameManager extends EventEmitter<FrameManagerEvents> {
|
|
|
60
60
|
|
|
61
61
|
#deviceRequestPromptManagerMap = new WeakMap<
|
|
62
62
|
CDPSession,
|
|
63
|
-
|
|
63
|
+
CdpDeviceRequestPromptManager
|
|
64
64
|
>();
|
|
65
65
|
|
|
66
66
|
#frameTreeHandled?: Deferred<void>;
|
|
@@ -380,10 +380,15 @@ export class FrameManager extends EventEmitter<FrameManagerEvents> {
|
|
|
380
380
|
void this.initialize(target._session()!, frame);
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
_deviceRequestPromptManager(
|
|
383
|
+
_deviceRequestPromptManager(
|
|
384
|
+
client: CDPSession,
|
|
385
|
+
): CdpDeviceRequestPromptManager {
|
|
384
386
|
let manager = this.#deviceRequestPromptManagerMap.get(client);
|
|
385
387
|
if (manager === undefined) {
|
|
386
|
-
manager = new
|
|
388
|
+
manager = new CdpDeviceRequestPromptManager(
|
|
389
|
+
client,
|
|
390
|
+
this.#timeoutSettings,
|
|
391
|
+
);
|
|
387
392
|
this.#deviceRequestPromptManagerMap.set(client, manager);
|
|
388
393
|
}
|
|
389
394
|
return manager;
|
package/src/cdp/HTTPRequest.ts
CHANGED
|
@@ -100,7 +100,11 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
100
100
|
|
|
101
101
|
this.interception.enabled = allowInterception;
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
this.updateHeaders(data.request.headers);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
updateHeaders(headers: Protocol.Network.Headers): void {
|
|
107
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
104
108
|
this.#headers[key.toLowerCase()] = value;
|
|
105
109
|
}
|
|
106
110
|
}
|
|
@@ -138,7 +142,8 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
override headers(): Record<string, string> {
|
|
141
|
-
|
|
145
|
+
// Callers should not be allowed to mutate internal structure.
|
|
146
|
+
return structuredClone(this.#headers);
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
override response(): CdpHTTPResponse | null {
|
package/src/cdp/HTTPResponse.ts
CHANGED
|
@@ -139,7 +139,7 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
139
139
|
'No resource with given identifier found'
|
|
140
140
|
) {
|
|
141
141
|
throw new ProtocolError(
|
|
142
|
-
'Could not load body for this request. This might happen if the request is a preflight request.',
|
|
142
|
+
'Could not load response body for this request. This might happen if the request is a preflight request.',
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
|
package/src/cdp/JSHandle.ts
CHANGED
|
@@ -45,7 +45,7 @@ export class CdpJSHandle<T = unknown> extends JSHandle<T> {
|
|
|
45
45
|
|
|
46
46
|
override async jsonValue(): Promise<T> {
|
|
47
47
|
if (!this.#remoteObject.objectId) {
|
|
48
|
-
return valueFromRemoteObject(this.#remoteObject);
|
|
48
|
+
return valueFromRemoteObject(this.#remoteObject) as T;
|
|
49
49
|
}
|
|
50
50
|
const value = await this.evaluate(object => {
|
|
51
51
|
return object;
|
|
@@ -83,7 +83,10 @@ export class NetworkEventManager {
|
|
|
83
83
|
Protocol.Fetch.RequestPausedEvent
|
|
84
84
|
>();
|
|
85
85
|
#httpRequestsMap = new Map<NetworkRequestId, CdpHTTPRequest>();
|
|
86
|
-
|
|
86
|
+
#requestWillBeSentExtraInfoMap = new Map<
|
|
87
|
+
NetworkRequestId,
|
|
88
|
+
Protocol.Network.RequestWillBeSentExtraInfoEvent[]
|
|
89
|
+
>();
|
|
87
90
|
/*
|
|
88
91
|
* The below maps are used to reconcile Network.responseReceivedExtraInfo
|
|
89
92
|
* events with their corresponding request. Each response and redirect
|
|
@@ -103,11 +106,23 @@ export class NetworkEventManager {
|
|
|
103
106
|
forget(networkRequestId: NetworkRequestId): void {
|
|
104
107
|
this.#requestWillBeSentMap.delete(networkRequestId);
|
|
105
108
|
this.#requestPausedMap.delete(networkRequestId);
|
|
109
|
+
this.#requestWillBeSentExtraInfoMap.delete(networkRequestId);
|
|
106
110
|
this.#queuedEventGroupMap.delete(networkRequestId);
|
|
107
111
|
this.#queuedRedirectInfoMap.delete(networkRequestId);
|
|
108
112
|
this.#responseReceivedExtraInfoMap.delete(networkRequestId);
|
|
109
113
|
}
|
|
110
114
|
|
|
115
|
+
requestExtraInfo(
|
|
116
|
+
networkRequestId: NetworkRequestId,
|
|
117
|
+
): Protocol.Network.RequestWillBeSentExtraInfoEvent[] {
|
|
118
|
+
if (!this.#requestWillBeSentExtraInfoMap.has(networkRequestId)) {
|
|
119
|
+
this.#requestWillBeSentExtraInfoMap.set(networkRequestId, []);
|
|
120
|
+
}
|
|
121
|
+
return this.#requestWillBeSentExtraInfoMap.get(
|
|
122
|
+
networkRequestId,
|
|
123
|
+
) as Protocol.Network.RequestWillBeSentExtraInfoEvent[];
|
|
124
|
+
}
|
|
125
|
+
|
|
111
126
|
responseExtraInfo(
|
|
112
127
|
networkRequestId: NetworkRequestId,
|
|
113
128
|
): Protocol.Network.ResponseReceivedExtraInfoEvent[] {
|