Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(bidi): add support for emulation.setUserAgentOverride (#37634)
Holger Benl0aee77c9d7fa
diff --git a/packages/playwright-core/src/server/bidi/bidiBrowser.ts b/packages/playwright-core/src/server/bidi/bidiBrowser.tsindex 96703ef9e5..28cdd80a98 100644--- a/packages/playwright-core/src/server/bidi/bidiBrowser.ts+++ b/packages/playwright-core/src/server/bidi/bidiBrowser.ts@@ -216,6 +216,12 @@ export class BidiBrowserContext extends BrowserContext {userContexts: [this._userContextId()],}));}+ if (this._options.userAgent) {+ promises.push(this._browser._browserSession.send('emulation.setUserAgentOverride', {+ userAgent: this._options.userAgent,+ userContexts: [this._userContextId()],+ }));+ }await Promise.all(promises);}@@ -317,6 +323,11 @@ export class BidiBrowserContext extends BrowserContext {}async setUserAgent(userAgent: string | undefined): Promise<void> {+ this._options.userAgent = userAgent;+ await this._browser._browserSession.send('emulation.setUserAgentOverride', {+ userAgent: userAgent ?? null,+ userContexts: [this._userContextId()],+ });}async doUpdateOffline(): Promise<void> {diff --git a/packages/playwright-core/src/server/bidi/third_party/bidiCommands.d.ts b/packages/playwright-core/src/server/bidi/third_party/bidiCommands.d.tsindex b84f6e8b1f..474876ed2c 100644--- a/packages/playwright-core/src/server/bidi/third_party/bidiCommands.d.ts+++ b/packages/playwright-core/src/server/bidi/third_party/bidiCommands.d.ts@@ -125,6 +125,10 @@ export interface Commands {params: Bidi.Emulation.SetTimezoneOverrideParameters;returnType: Bidi.EmptyResult;};+ 'emulation.setUserAgentOverride': {+ params: Bidi.Emulation.SetUserAgentOverrideParameters;+ returnType: Bidi.Emulation.SetUserAgentOverrideResult;+ };'emulation.setLocaleOverride': {params: Bidi.Emulation.SetLocaleOverrideParameters;diff --git a/packages/playwright-core/src/server/bidi/third_party/bidiProtocolCore.ts b/packages/playwright-core/src/server/bidi/third_party/bidiProtocolCore.tsindex cdb7919260..cb010b4362 100644--- a/packages/playwright-core/src/server/bidi/third_party/bidiProtocolCore.ts+++ b/packages/playwright-core/src/server/bidi/third_party/bidiProtocolCore.ts@@ -18,30 +18,15 @@// Copied from upstream: https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/src/protocol/generated/webdriver-bidi.ts/**- * THIS FILE IS AUTOGENERATED by cddlconv 0.1.6.+ * THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.* Run `node tools/generate-bidi-types.mjs` to regenerate.* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs*/-export type Event = {- type: 'event';-} & EventData &- Extensible;export type Command = {id: JsUint;} & CommandData &Extensible;-export type CommandResponse = {- type: 'success';- id: JsUint;- result: ResultData;-} & Extensible;-export type EventData =- | BrowsingContextEvent- | InputEvent- | LogEvent- | NetworkEvent- | ScriptEvent;export type CommandData =| BrowserCommand| BrowsingContextCommand@@ -52,16 +37,13 @@ export type CommandData =| SessionCommand| StorageCommand| WebExtensionCommand;-export type ResultData =- | BrowsingContextResult- | EmptyResult- | NetworkResult- | ScriptResult- | SessionResult- | StorageResult- | WebExtensionResult;export type EmptyParams = Extensible;export type Message = CommandResponse | ErrorResponse | Event;+export type CommandResponse = {+ type: 'success';+ id: JsUint;+ result: ResultData;+} & Extensible;export type ErrorResponse = {type: 'error';id: JsUint | null;@@ -69,7 +51,27 @@ export type ErrorResponse = {message: string;stacktrace?: string;} & Extensible;+export type ResultData =+ | BrowserResult+ | BrowsingContextResult+ | EmulationResult+ | InputResult+ | NetworkResult+ | ScriptResult+ | SessionResult+ | StorageResult+ | WebExtensionResult;export type EmptyResult = Extensible;+export type Event = {+ type: 'event';+} & EventData &+ Extensible;+export type EventData =+ | BrowsingContextEvent+ | InputEvent+ | LogEvent+ | NetworkEvent+ | ScriptEvent;export type Extensible = {[key: string]: any;};@@ -120,18 +122,12 @@ export type SessionCommand =| Session.Status| Session.Subscribe| Session.Unsubscribe;-export namespace Session {- export type ProxyConfiguration =- | Session.AutodetectProxyConfiguration- | Session.DirectProxyConfiguration- | Session.ManualProxyConfiguration- | Session.PacProxyConfiguration- | Session.SystemProxyConfiguration;-}export type SessionResult =+ | Session.EndResult| Session.NewResult| Session.StatusResult- | Session.SubscribeResult;+ | Session.SubscribeResult+ | Session.UnsubscribeResult;export namespace Session {export type CapabilitiesRequest = {alwaysMatch?: Session.CapabilityRequest;@@ -148,6 +144,14 @@ export namespace Session {unhandledPromptBehavior?: Session.UserPromptHandler;} & Extensible;}+export namespace Session {+ export type ProxyConfiguration =+ | Session.AutodetectProxyConfiguration+ | Session.DirectProxyConfiguration+ | Session.ManualProxyConfiguration+ | Session.PacProxyConfiguration+ | Session.SystemProxyConfiguration;+}export namespace Session {export type AutodetectProxyConfiguration = {proxyType: 'autodetect';@@ -225,10 +229,6 @@ export namespace Session {export namespace Session {export type UnsubscribeByAttributesRequest = {events: [string, ...string[]];- contexts?: [- BrowsingContext.BrowsingContext,- ...BrowsingContext.BrowsingContext[],- ];};}export namespace Session {@@ -276,6 +276,9 @@ export namespace Session {params: EmptyParams;};}+export namespace Session {+ export type EndResult = EmptyResult;+}export namespace Session {export type Subscribe = {method: 'session.subscribe';@@ -298,16 +301,25 @@ export namespace Session {| Session.UnsubscribeByAttributesRequest| Session.UnsubscribeByIdRequest;}+export namespace Session {+ export type UnsubscribeResult = EmptyResult;+}export type BrowserCommand =| Browser.Close| Browser.CreateUserContext| Browser.GetClientWindows| Browser.GetUserContexts| Browser.RemoveUserContext- | Browser.SetClientWindowState;+ | Browser.SetClientWindowState+ | Browser.SetDownloadBehavior;export type BrowserResult =+ | Browser.CloseResult| Browser.CreateUserContextResult- | Browser.GetUserContextsResult;+ | Browser.GetClientWindowsResult+ | Browser.GetUserContextsResult+ | Browser.RemoveUserContextResult+ | Browser.SetClientWindowStateResult+ | Browser.SetDownloadBehaviorResult;export namespace Browser {export type ClientWindow = string;}@@ -336,6 +348,9 @@ export namespace Browser {params: EmptyParams;};}+export namespace Browser {+ export type CloseResult = EmptyResult;+}export namespace Browser {export type CreateUserContext = {method: 'browser.createUserContext';@@ -385,6 +400,9 @@ export namespace Browser {userContext: Browser.UserContext;};}+export namespace Browser {+ export type RemoveUserContextResult = EmptyResult;+}export namespace Browser {export type SetClientWindowState = {method: 'browser.setClientWindowState';@@ -410,6 +428,40 @@ export namespace Browser {y?: JsInt;};}+export namespace Browser {+ export type SetClientWindowStateResult = Browser.ClientWindowInfo;+}+export namespace Browser {+ export type SetDownloadBehavior = {+ method: 'browser.setDownloadBehavior';+ params: Browser.SetDownloadBehaviorParameters;+ };+}+export namespace Browser {+ export type SetDownloadBehaviorParameters = {+ downloadBehavior: Browser.DownloadBehavior | null;+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];+ };+}+export namespace Browser {+ export type DownloadBehavior =+ | Browser.DownloadBehaviorAllowed+ | Browser.DownloadBehaviorDenied;+}+export namespace Browser {+ export type DownloadBehaviorAllowed = {+ type: 'allowed';+ destinationFolder: string;+ };+}+export namespace Browser {+ export type DownloadBehaviorDenied = {+ type: 'denied';+ };+}+export namespace Browser {+ export type SetDownloadBehaviorResult = EmptyResult;+}export type BrowsingContextCommand =| BrowsingContext.Activate| BrowsingContext.CaptureScreenshot@@ -423,6 +475,19 @@ export type BrowsingContextCommand =| BrowsingContext.Reload| BrowsingContext.SetViewport| BrowsingContext.TraverseHistory;+export type BrowsingContextResult =+ | BrowsingContext.ActivateResult+ | BrowsingContext.CaptureScreenshotResult+ | BrowsingContext.CloseResult+ | BrowsingContext.CreateResult+ | BrowsingContext.GetTreeResult+ | BrowsingContext.HandleUserPromptResult+ | BrowsingContext.LocateNodesResult+ | BrowsingContext.NavigateResult+ | BrowsingContext.PrintResult+ | BrowsingContext.ReloadResult+ | BrowsingContext.SetViewportResult+ | BrowsingContext.TraverseHistoryResult;export type BrowsingContextEvent =| BrowsingContext.ContextCreated| BrowsingContext.ContextDestroyed@@ -438,14 +503,6 @@ export type BrowsingContextEvent =| BrowsingContext.NavigationStarted| BrowsingContext.UserPromptClosed| BrowsingContext.UserPromptOpened;-export type BrowsingContextResult =- | BrowsingContext.CaptureScreenshotResult- | BrowsingContext.CreateResult- | BrowsingContext.GetTreeResult- | BrowsingContext.LocateNodesResult- | BrowsingContext.NavigateResult- | BrowsingContext.PrintResult- | BrowsingContext.TraverseHistoryResult;export namespace BrowsingContext {export type BrowsingContext = string;}@@ -549,6 +606,15 @@ export namespace BrowsingContext {context: BrowsingContext.BrowsingContext;};}+export namespace BrowsingContext {+ export type ActivateResult = EmptyResult;+}+export namespace BrowsingContext {+ export type CaptureScreenshot = {+ method: 'browsingContext.captureScreenshot';+ params: BrowsingContext.CaptureScreenshotParameters;+ };+}export namespace BrowsingContext {export type CaptureScreenshotParameters = {context: BrowsingContext.BrowsingContext;@@ -560,12 +626,6 @@ export namespace BrowsingContext {clip?: BrowsingContext.ClipRectangle;};}-export namespace BrowsingContext {- export type CaptureScreenshot = {- method: 'browsingContext.captureScreenshot';- params: BrowsingContext.CaptureScreenshotParameters;- };-}export namespace BrowsingContext {export type ImageFormat = {type: string;@@ -615,6 +675,9 @@ export namespace BrowsingContext {promptUnload?: boolean;};}+export namespace BrowsingContext {+ export type CloseResult = EmptyResult;+}export namespace BrowsingContext {export type Create = {method: 'browsingContext.create';@@ -673,6 +736,15 @@ export namespace BrowsingContext {userText?: string;};}+export namespace BrowsingContext {+ export type HandleUserPromptResult = EmptyResult;+}+export namespace BrowsingContext {+ export type LocateNodes = {+ method: 'browsingContext.locateNodes';+ params: BrowsingContext.LocateNodesParameters;+ };+}export namespace BrowsingContext {export type LocateNodesParameters = {context: BrowsingContext.BrowsingContext;@@ -685,12 +757,6 @@ export namespace BrowsingContext {startNodes?: [Script.SharedReference, ...Script.SharedReference[]];};}-export namespace BrowsingContext {- export type LocateNodes = {- method: 'browsingContext.locateNodes';- params: BrowsingContext.LocateNodesParameters;- };-}export namespace BrowsingContext {export type LocateNodesResult = {nodes: [...Script.NodeRemoteValue[]];@@ -809,6 +875,9 @@ export namespace BrowsingContext {wait?: BrowsingContext.ReadinessState;};}+export namespace BrowsingContext {+ export type ReloadResult = BrowsingContext.NavigateResult;+}export namespace BrowsingContext {export type SetViewport = {method: 'browsingContext.setViewport';@@ -832,6 +901,9 @@ export namespace BrowsingContext {height: JsUint;};}+export namespace BrowsingContext {+ export type SetViewportResult = EmptyResult;+}export namespace BrowsingContext {export type TraverseHistory = {method: 'browsingContext.traverseHistory';@@ -845,7 +917,7 @@ export namespace BrowsingContext {};}export namespace BrowsingContext {- export type TraverseHistoryResult = Record<string, never>;+ export type TraverseHistoryResult = EmptyResult;}export namespace BrowsingContext {export type ContextCreated = {@@ -981,7 +1053,17 @@ export type EmulationCommand =| Emulation.SetGeolocationOverride| Emulation.SetLocaleOverride| Emulation.SetScreenOrientationOverride- | Emulation.SetTimezoneOverride;+ | Emulation.SetScriptingEnabled+ | Emulation.SetTimezoneOverride+ | Emulation.SetUserAgentOverride;+export type EmulationResult =+ | Emulation.SetForcedColorsModeThemeOverrideResult+ | Emulation.SetGeolocationOverrideResult+ | Emulation.SetLocaleOverrideResult+ | Emulation.SetScreenOrientationOverrideResult+ | Emulation.SetScriptingEnabledResult+ | Emulation.SetTimezoneOverrideResult+ | Emulation.SetUserAgentOverrideResult;export namespace Emulation {export type SetForcedColorsModeThemeOverride = {method: 'emulation.setForcedColorsModeThemeOverride';@@ -1004,6 +1086,9 @@ export namespace Emulation {Dark = 'dark',}}+export namespace Emulation {+ export type SetForcedColorsModeThemeOverrideResult = EmptyResult;+}export namespace Emulation {export type SetGeolocationOverride = {method: 'emulation.setGeolocationOverride';@@ -1071,6 +1156,9 @@ export namespace Emulation {type: 'positionUnavailable';};}+export namespace Emulation {+ export type SetGeolocationOverrideResult = EmptyResult;+}export namespace Emulation {export type SetLocaleOverride = {method: 'emulation.setLocaleOverride';@@ -1087,6 +1175,9 @@ export namespace Emulation {userContexts?: [Browser.UserContext, ...Browser.UserContext[]];};}+export namespace Emulation {+ export type SetLocaleOverrideResult = EmptyResult;+}export namespace Emulation {export type SetScreenOrientationOverride = {method: 'emulation.setScreenOrientationOverride';@@ -1122,6 +1213,47 @@ export namespace Emulation {userContexts?: [Browser.UserContext, ...Browser.UserContext[]];};}+export namespace Emulation {+ export type SetScreenOrientationOverrideResult = EmptyResult;+}+export namespace Emulation {+ export type SetUserAgentOverride = {+ method: 'emulation.setUserAgentOverride';+ params: Emulation.SetUserAgentOverrideParameters;+ };+}+export namespace Emulation {+ export type SetUserAgentOverrideParameters = {+ userAgent: string | null;+ contexts?: [+ BrowsingContext.BrowsingContext,+ ...BrowsingContext.BrowsingContext[],+ ];+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];+ };+}+export namespace Emulation {+ export type SetUserAgentOverrideResult = EmptyResult;+}+export namespace Emulation {+ export type SetScriptingEnabled = {+ method: 'emulation.setScriptingEnabled';+ params: Emulation.SetScriptingEnabledParameters;+ };+}+export namespace Emulation {+ export type SetScriptingEnabledParameters = {+ enabled: false | null;+ contexts?: [+ BrowsingContext.BrowsingContext,+ ...BrowsingContext.BrowsingContext[],+ ];+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];+ };+}+export namespace Emulation {+ export type SetScriptingEnabledResult = EmptyResult;+}export namespace Emulation {export type SetTimezoneOverride = {method: 'emulation.setTimezoneOverride';@@ -1138,6 +1270,9 @@ export namespace Emulation {userContexts?: [Browser.UserContext, ...Browser.UserContext[]];};}+export namespace Emulation {+ export type SetTimezoneOverrideResult = EmptyResult;+}export type NetworkCommand =| Network.AddDataCollector| Network.AddIntercept@@ -1152,13 +1287,26 @@ export type NetworkCommand =| Network.RemoveIntercept| Network.SetCacheBehavior| Network.SetExtraHeaders;+export type NetworkResult =+ | Network.AddDataCollectorResult+ | Network.AddInterceptResult+ | Network.ContinueRequestResult+ | Network.ContinueResponseResult+ | Network.ContinueWithAuthResult+ | Network.DisownDataResult+ | Network.FailRequestResult+ | Network.GetDataResult+ | Network.ProvideResponseResult+ | Network.RemoveDataCollectorResult+ | Network.RemoveInterceptResult+ | Network.SetCacheBehaviorResult+ | Network.SetExtraHeadersResult;export type NetworkEvent =| Network.AuthRequired| Network.BeforeRequestSent| Network.FetchError| Network.ResponseCompleted| Network.ResponseStarted;-export type NetworkResult = Network.AddInterceptResult;export namespace Network {export type AuthChallenge = {scheme: string;@@ -1369,6 +1517,12 @@ export namespace Network {collector: Network.Collector;};}+export namespace Network {+ export type AddIntercept = {+ method: 'network.addIntercept';+ params: Network.AddInterceptParameters;+ };+}export namespace Network {export type AddInterceptParameters = {phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];@@ -1379,12 +1533,6 @@ export namespace Network {urlPatterns?: [...Network.UrlPattern[]];};}-export namespace Network {- export type AddIntercept = {- method: 'network.addIntercept';- params: Network.AddInterceptParameters;- };-}export namespace Network {export const enum InterceptPhase {BeforeRequestSent = 'beforeRequestSent',@@ -1413,6 +1561,9 @@ export namespace Network {url?: string;};}+export namespace Network {+ export type ContinueRequestResult = EmptyResult;+}export namespace Network {export type ContinueResponse = {method: 'network.continueResponse';@@ -1429,6 +1580,9 @@ export namespace Network {statusCode?: JsUint;};}+export namespace Network {+ export type ContinueResponseResult = EmptyResult;+}export namespace Network {export type ContinueWithAuth = {method: 'network.continueWithAuth';@@ -1454,6 +1608,9 @@ export namespace Network {action: 'default' | 'cancel';};}+export namespace Network {+ export type ContinueWithAuthResult = EmptyResult;+}export namespace Network {export type DisownData = {method: 'network.disownData';@@ -1467,6 +1624,9 @@ export namespace Network {request: Network.Request;};}+export namespace Network {+ export type DisownDataResult = EmptyResult;+}export namespace Network {export type FailRequest = {method: 'network.failRequest';@@ -1478,6 +1638,9 @@ export namespace Network {request: Network.Request;};}+export namespace Network {+ export type FailRequestResult = EmptyResult;+}export namespace Network {export type GetData = {method: 'network.getData';@@ -1516,6 +1679,9 @@ export namespace Network {statusCode?: JsUint;};}+export namespace Network {+ export type ProvideResponseResult = EmptyResult;+}export namespace Network {export type RemoveDataCollector = {method: 'network.removeDataCollector';@@ -1527,6 +1693,9 @@ export namespace Network {collector: Network.Collector;};}+export namespace Network {+ export type RemoveDataCollectorResult = EmptyResult;+}export namespace Network {export type RemoveIntercept = {method: 'network.removeIntercept';@@ -1538,6 +1707,9 @@ export namespace Network {intercept: Network.Intercept;};}+export namespace Network {+ export type RemoveInterceptResult = EmptyResult;+}export namespace Network {export type SetCacheBehavior = {method: 'network.setCacheBehavior';@@ -1553,6 +1725,9 @@ export namespace Network {];};}+export namespace Network {+ export type SetCacheBehaviorResult = EmptyResult;+}export namespace Network {export type SetExtraHeaders = {method: 'network.setExtraHeaders';@@ -1561,7 +1736,7 @@ export namespace Network {}export namespace Network {export type SetExtraHeadersParameters = {- headers: [Network.Header, ...Network.Header[]];+ headers: [...Network.Header[]];contexts?: [BrowsingContext.BrowsingContext,...BrowsingContext.BrowsingContext[],@@ -1569,30 +1744,59 @@ export namespace Network {userContexts?: [Browser.UserContext, ...Browser.UserContext[]];};}-export type ScriptEvent =- | Script.Message- | Script.RealmCreated- | Script.RealmDestroyed;+export namespace Network {+ export type SetExtraHeadersResult = EmptyResult;+}+export namespace Network {+ export type AuthRequired = {+ method: 'network.authRequired';+ params: Network.AuthRequiredParameters;+ };+}export namespace Network {export type AuthRequiredParameters = Network.BaseParameters & {response: Network.ResponseData;};}+export namespace Network {+ export type BeforeRequestSent = {+ method: 'network.beforeRequestSent';+ params: Network.BeforeRequestSentParameters;+ };+}export namespace Network {export type BeforeRequestSentParameters = Network.BaseParameters & {initiator?: Network.Initiator;};}+export namespace Network {+ export type FetchError = {+ method: 'network.fetchError';+ params: Network.FetchErrorParameters;+ };+}export namespace Network {export type FetchErrorParameters = Network.BaseParameters & {errorText: string;};}+export namespace Network {+ export type ResponseCompleted = {+ method: 'network.responseCompleted';+ params: Network.ResponseCompletedParameters;+ };+}export namespace Network {export type ResponseCompletedParameters = Network.BaseParameters & {response: Network.ResponseData;};}+export namespace Network {+ export type ResponseStarted = {+ method: 'network.responseStarted';+ params: Network.ResponseStartedParameters;+ };+}export namespace Network {export type ResponseStartedParameters = Network.BaseParameters & {response: Network.ResponseData;@@ -1607,57 +1811,18 @@ export type ScriptCommand =| Script.RemovePreloadScript;export type ScriptResult =| Script.AddPreloadScriptResult+ | Script.CallFunctionResult+ | Script.DisownResult| Script.EvaluateResult- | Script.GetRealmsResult;-export namespace Network {- export type AuthRequired = {- method: 'network.authRequired';- params: Network.AuthRequiredParameters;- };-}-export namespace Network {- export type BeforeRequestSent = {- method: 'network.beforeRequestSent';- params: Network.BeforeRequestSentParameters;- };-}-export namespace Network {- export type FetchError = {- method: 'network.fetchError';- params: Network.FetchErrorParameters;- };-}-export namespace Network {- export type ResponseCompleted = {- method: 'network.responseCompleted';- params: Network.ResponseCompletedParameters;- };-}-export namespace Network {- export type ResponseStarted = {- method: 'network.responseStarted';- params: Network.ResponseStartedParameters;- };-}+ | Script.GetRealmsResult+ | Script.RemovePreloadScriptResult;+export type ScriptEvent =+ | Script.Message+ | Script.RealmCreated+ | Script.RealmDestroyed;export namespace Script {export type Channel = string;}-export namespace Script {- export type EvaluateResultSuccess = {- type: 'success';- result: Script.RemoteValue;- realm: Script.Realm;- };-}-export namespace Script {- export type ExceptionDetails = {- columnNumber: JsUint;- exception: Script.RemoteValue;- lineNumber: JsUint;- stackTrace: Script.StackTrace;- text: string;- };-}export namespace Script {export type ChannelValue = {type: 'channel';@@ -1676,6 +1841,13 @@ export namespace Script {| Script.EvaluateResultSuccess| Script.EvaluateResultException;}+export namespace Script {+ export type EvaluateResultSuccess = {+ type: 'success';+ result: Script.RemoteValue;+ realm: Script.Realm;+ };+}export namespace Script {export type EvaluateResultException = {type: 'exception';@@ -1684,13 +1856,19 @@ export namespace Script {};}export namespace Script {- export type Handle = string;+ export type ExceptionDetails = {+ columnNumber: JsUint;+ exception: Script.RemoteValue;+ lineNumber: JsUint;+ stackTrace: Script.StackTrace;+ text: string;+ };}export namespace Script {- export type InternalId = string;+ export type Handle = string;}export namespace Script {- export type ListLocalValue = [...Script.LocalValue[]];+ export type InternalId = string;}export namespace Script {export type LocalValue =@@ -1704,6 +1882,9 @@ export namespace Script {| Script.RegExpLocalValue| Script.SetLocalValue;}+export namespace Script {+ export type ListLocalValue = [...Script.LocalValue[]];+}export namespace Script {export type ArrayLocalValue = {type: 'array';@@ -1875,12 +2056,21 @@ export namespace Script {| 'worklet';}export namespace Script {- export type ListRemoteValue = [...Script.RemoteValue[]];+ export type RemoteReference =+ | Script.SharedReference+ | Script.RemoteObjectReference;}export namespace Script {- export type MappingRemoteValue = [- ...[Script.RemoteValue | string, Script.RemoteValue][],- ];+ export type SharedReference = {+ sharedId: Script.SharedId;+ handle?: Script.Handle;+ } & Extensible;+}+export namespace Script {+ export type RemoteObjectReference = {+ handle: Script.Handle;+ sharedId?: Script.SharedId;+ } & Extensible;}export namespace Script {export type RemoteValue =@@ -1907,21 +2097,12 @@ export namespace Script {| Script.WindowProxyRemoteValue;}export namespace Script {- export type RemoteReference =- | Script.SharedReference- | Script.RemoteObjectReference;-}-export namespace Script {- export type SharedReference = {- sharedId: Script.SharedId;- handle?: Script.Handle;- } & Extensible;+ export type ListRemoteValue = [...Script.RemoteValue[]];}export namespace Script {- export type RemoteObjectReference = {- handle: Script.Handle;- sharedId?: Script.SharedId;- } & Extensible;+ export type MappingRemoteValue = [+ ...[Script.RemoteValue | string, Script.RemoteValue][],+ ];}export namespace Script {export type SymbolRemoteValue = {@@ -2183,6 +2364,15 @@ export namespace Script {target: Script.Target;};}+export namespace Script {+ export type DisownResult = EmptyResult;+}+export namespace Script {+ export type CallFunction = {+ method: 'script.callFunction';+ params: Script.CallFunctionParameters;+ };+}export namespace Script {export type CallFunctionParameters = {functionDeclaration: string;@@ -2199,10 +2389,7 @@ export namespace Script {};}export namespace Script {- export type CallFunction = {- method: 'script.callFunction';- params: Script.CallFunctionParameters;- };+ export type CallFunctionResult = Script.EvaluateResult;}export namespace Script {export type Evaluate = {@@ -2251,6 +2438,15 @@ export namespace Script {script: Script.PreloadScript;};}+export namespace Script {+ export type RemovePreloadScriptResult = EmptyResult;+}+export namespace Script {+ export type Message = {+ method: 'script.message';+ params: Script.MessageParameters;+ };+}export namespace Script {export type MessageParameters = {channel: Script.Channel;@@ -2264,12 +2460,6 @@ export namespace Script {params: Script.RealmInfo;};}-export namespace Script {- export type Message = {- method: 'script.message';- params: Script.MessageParameters;- };-}export namespace Script {export type RealmDestroyed = {method: 'script.realmDestroyed';@@ -2441,6 +2631,10 @@ export type InputCommand =| Input.PerformActions| Input.ReleaseActions| Input.SetFiles;+export type InputResult =+ | Input.PerformActionsResult+ | Input.ReleaseActionsResult+ | Input.SetFilesResult;export type InputEvent = Input.FileDialogOpened;export namespace Input {export type ElementOrigin = {@@ -2448,12 +2642,25 @@ export namespace Input {element: Script.SharedReference;};}+export namespace Input {+ export type PerformActions = {+ method: 'input.performActions';+ params: Input.PerformActionsParameters;+ };+}export namespace Input {export type PerformActionsParameters = {context: BrowsingContext.BrowsingContext;actions: [...Input.SourceActions[]];};}+export namespace Input {+ export type SourceActions =+ | Input.NoneSourceActions+ | Input.KeySourceActions+ | Input.PointerSourceActions+ | Input.WheelSourceActions;+}export namespace Input {export type NoneSourceActions = {type: 'none';@@ -2461,6 +2668,9 @@ export namespace Input {actions: [...Input.NoneSourceAction[]];};}+export namespace Input {+ export type NoneSourceAction = Input.PauseAction;+}export namespace Input {export type KeySourceActions = {type: 'key';@@ -2468,6 +2678,12 @@ export namespace Input {actions: [...Input.KeySourceAction[]];};}+export namespace Input {+ export type KeySourceAction =+ | Input.PauseAction+ | Input.KeyDownAction+ | Input.KeyUpAction;+}export namespace Input {export type PointerSourceActions = {type: 'pointer';@@ -2476,28 +2692,6 @@ export namespace Input {actions: [...Input.PointerSourceAction[]];};}-export namespace Input {- export type PerformActions = {- method: 'input.performActions';- params: Input.PerformActionsParameters;- };-}-export namespace Input {- export type SourceActions =- | Input.NoneSourceActions- | Input.KeySourceActions- | Input.PointerSourceActions- | Input.WheelSourceActions;-}-export namespace Input {- export type NoneSourceAction = Input.PauseAction;-}-export namespace Input {- export type KeySourceAction =- | Input.PauseAction- | Input.KeyDownAction- | Input.KeyUpAction;-}export namespace Input {export const enum PointerType {Mouse = 'mouse',@@ -2513,13 +2707,6 @@ export namespace Input {pointerType?: Input.PointerType;};}-export namespace Input {- export type WheelSourceActions = {- type: 'wheel';- id: string;- actions: [...Input.WheelSourceAction[]];- };-}export namespace Input {export type PointerSourceAction =| Input.PauseAction@@ -2527,6 +2714,13 @@ export namespace Input {| Input.PointerUpAction| Input.PointerMoveAction;}+export namespace Input {+ export type WheelSourceActions = {+ type: 'wheel';+ id: string;+ actions: [...Input.WheelSourceAction[]];+ };+}export namespace Input {export type WheelSourceAction = Input.PauseAction | Input.WheelScrollAction;}@@ -2624,6 +2818,9 @@ export namespace Input {export namespace Input {export type Origin = 'viewport' | 'pointer' | Input.ElementOrigin;}+export namespace Input {+ export type PerformActionsResult = EmptyResult;+}export namespace Input {export type ReleaseActions = {method: 'input.releaseActions';@@ -2635,6 +2832,9 @@ export namespace Input {context: BrowsingContext.BrowsingContext;};}+export namespace Input {+ export type ReleaseActionsResult = EmptyResult;+}export namespace Input {export type SetFiles = {method: 'input.setFiles';@@ -2648,6 +2848,9 @@ export namespace Input {files: [...string[]];};}+export namespace Input {+ export type SetFilesResult = EmptyResult;+}export namespace Input {export type FileDialogOpened = {method: 'input.fileDialogOpened';@@ -2662,21 +2865,23 @@ export namespace Input {};}export type WebExtensionCommand = WebExtension.Install | WebExtension.Uninstall;-export type WebExtensionResult = WebExtension.InstallResult;+export type WebExtensionResult =+ | WebExtension.InstallResult+ | WebExtension.UninstallResult;export namespace WebExtension {export type Extension = string;}-export namespace WebExtension {- export type InstallParameters = {- extensionData: WebExtension.ExtensionData;- };-}export namespace WebExtension {export type Install = {method: 'webExtension.install';params: WebExtension.InstallParameters;};}+export namespace WebExtension {+ export type InstallParameters = {+ extensionData: WebExtension.ExtensionData;+ };+}export namespace WebExtension {export type ExtensionData =| WebExtension.ExtensionArchivePath@@ -2717,3 +2922,6 @@ export namespace WebExtension {extension: WebExtension.Extension;};}+export namespace WebExtension {+ export type UninstallResult = EmptyResult;+}