Documentation
¶
Overview ¶
Package browser provides the Chrome DevTools Protocol commands, types, and events for the Browser domain.
The Browser domain defines methods and events for browser managing.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type AddMockCameraParams
- type AddPrivacySandboxEnrollmentOverrideParams
- type Bounds
- type Bucket
- type CancelDownloadParams
- type CommandID
- type DownloadProgressState
- type EventDownloadProgress
- type EventDownloadWillBegin
- type ExecuteBrowserCommandParams
- type GetBrowserCommandLineResult
- type GetGlobalPrivacyControlResult
- type GetHistogramParams
- type GetHistogramResult
- type GetHistogramsParams
- type GetHistogramsResult
- type GetVersionResult
- type GetWindowBoundsParams
- type GetWindowBoundsResult
- type GetWindowForTargetParams
- type GetWindowForTargetResult
- type Histogram
- type PermissionDescriptor
- type PermissionSetting
- type PermissionType
- type ResetPermissionsParams
- type SetContentsSizeParams
- type SetDockTileParams
- type SetDownloadBehaviorBehavior
- type SetDownloadBehaviorParams
- type SetGlobalPrivacyControlParams
- type SetGlobalPrivacyControlResult
- type SetPermissionParams
- type SetWindowBoundsParams
- type WindowID
- type WindowState
Constants ¶
const ( CommandSetPermission = "Browser.setPermission" CommandResetPermissions = "Browser.resetPermissions" CommandSetDownloadBehavior = "Browser.setDownloadBehavior" CommandCancelDownload = "Browser.cancelDownload" CommandClose = "Browser.close" CommandCrash = "Browser.crash" CommandCrashGPUProcess = "Browser.crashGpuProcess" CommandGetVersion = "Browser.getVersion" CommandGetBrowserCommandLine = "Browser.getBrowserCommandLine" CommandAddMockCamera = "Browser.addMockCamera" CommandGetHistograms = "Browser.getHistograms" CommandGetHistogram = "Browser.getHistogram" CommandGetWindowBounds = "Browser.getWindowBounds" CommandGetWindowForTarget = "Browser.getWindowForTarget" CommandSetWindowBounds = "Browser.setWindowBounds" CommandSetContentsSize = "Browser.setContentsSize" CommandSetDockTile = "Browser.setDockTile" CommandExecuteBrowserCommand = "Browser.executeBrowserCommand" CommandAddPrivacySandboxEnrollmentOverride = "Browser.addPrivacySandboxEnrollmentOverride" CommandGetGlobalPrivacyControl = "Browser.getGlobalPrivacyControl" CommandSetGlobalPrivacyControl = "Browser.setGlobalPrivacyControl" )
Command names.
Variables ¶
var AddMockCamera = cdp.Command[AddMockCameraParams, cdp.Empty]{Method: CommandAddMockCamera}
AddMockCamera adds or updates a mock camera in the shared video capture device list for test automation. The mock camera is not scoped to a particular page or frame and is removed when the DevTools session that created it disconnects.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-addMockCamera
var AddPrivacySandboxEnrollmentOverride = cdp.Command[AddPrivacySandboxEnrollmentOverrideParams, cdp.Empty]{Method: CommandAddPrivacySandboxEnrollmentOverride}
AddPrivacySandboxEnrollmentOverride allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
var CancelDownload = cdp.Command[CancelDownloadParams, cdp.Empty]{Method: CommandCancelDownload}
CancelDownload cancel a download if in progress.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-cancelDownload
var Close = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandClose}
Close close browser gracefully.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-close
var Crash = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandCrash}
Crash crashes browser on the main thread.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crash
var CrashGPUProcess = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandCrashGPUProcess}
CrashGPUProcess crashes GPU process.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crashGpuProcess
var DownloadProgress = cdp.Event[EventDownloadProgress]{Method: "Browser.downloadProgress"}
DownloadProgress fired when download makes progress. Last call has |done| == true.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
var DownloadWillBegin = cdp.Event[EventDownloadWillBegin]{Method: "Browser.downloadWillBegin"}
DownloadWillBegin fired when page is about to start a download.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadWillBegin
var ExecuteBrowserCommand = cdp.Command[ExecuteBrowserCommandParams, cdp.Empty]{Method: CommandExecuteBrowserCommand}
ExecuteBrowserCommand invoke custom browser commands used by telemetry.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-executeBrowserCommand
var GetBrowserCommandLine = cdp.Command[cdp.Empty, GetBrowserCommandLineResult]{Method: CommandGetBrowserCommandLine}
GetBrowserCommandLine returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getBrowserCommandLine
var GetGlobalPrivacyControl = cdp.Command[cdp.Empty, GetGlobalPrivacyControlResult]{Method: CommandGetGlobalPrivacyControl}
GetGlobalPrivacyControl gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#get-global-privacy-control.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getGlobalPrivacyControl
var GetHistogram = cdp.Command[GetHistogramParams, GetHistogramResult]{Method: CommandGetHistogram}
GetHistogram get a Chrome histogram by name.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistogram
var GetHistograms = cdp.Command[GetHistogramsParams, GetHistogramsResult]{Method: CommandGetHistograms}
GetHistograms get Chrome histograms.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistograms
var GetVersion = cdp.Command[cdp.Empty, GetVersionResult]{Method: CommandGetVersion}
GetVersion returns version information.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getVersion
var GetWindowBounds = cdp.Command[GetWindowBoundsParams, GetWindowBoundsResult]{Method: CommandGetWindowBounds}
GetWindowBounds get position and size of the browser window.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowBounds
var GetWindowForTarget = cdp.Command[GetWindowForTargetParams, GetWindowForTargetResult]{Method: CommandGetWindowForTarget}
GetWindowForTarget get the browser window that contains the devtools target.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowForTarget
var ResetPermissions = cdp.Command[ResetPermissionsParams, cdp.Empty]{Method: CommandResetPermissions}
ResetPermissions reset all permission management for all origins.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-resetPermissions
var SetContentsSize = cdp.Command[SetContentsSizeParams, cdp.Empty]{Method: CommandSetContentsSize}
SetContentsSize set size of the browser contents resizing browser window as necessary.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setContentsSize
var SetDockTile = cdp.Command[SetDockTileParams, cdp.Empty]{Method: CommandSetDockTile}
SetDockTile set dock tile details, platform-specific.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDockTile
var SetDownloadBehavior = cdp.Command[SetDownloadBehaviorParams, cdp.Empty]{Method: CommandSetDownloadBehavior}
SetDownloadBehavior set the behavior when downloading a file.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
var SetGlobalPrivacyControl = cdp.Command[SetGlobalPrivacyControlParams, SetGlobalPrivacyControlResult]{Method: CommandSetGlobalPrivacyControl}
SetGlobalPrivacyControl sets and then gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#set-global-privacy-control.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setGlobalPrivacyControl
var SetPermission = cdp.Command[SetPermissionParams, cdp.Empty]{Method: CommandSetPermission}
SetPermission set permission settings for given embedding and embedded origins.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setPermission
var SetWindowBounds = cdp.Command[SetWindowBoundsParams, cdp.Empty]{Method: CommandSetWindowBounds}
SetWindowBounds set position and/or size of the browser window.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setWindowBounds
Functions ¶
This section is empty.
Types ¶
type AddMockCameraParams ¶
type AddMockCameraParams struct {
DeviceID string `json:"deviceId"` // Required non-empty identifier for the mock camera. This is mapped to an internal virtual-device identifier and is not the MediaDeviceInfo.deviceId exposed to the page.
}
AddMockCameraParams are the parameters of the command Browser.addMockCamera.
type AddPrivacySandboxEnrollmentOverrideParams ¶
type AddPrivacySandboxEnrollmentOverrideParams struct {
URL string `json:"url"`
}
AddPrivacySandboxEnrollmentOverrideParams are the parameters of the command Browser.addPrivacySandboxEnrollmentOverride.
type Bounds ¶
type Bounds struct {
Left int64 `json:"left,omitempty,omitzero"` // The offset from the left edge of the screen to the window in pixels.
Top int64 `json:"top,omitempty,omitzero"` // The offset from the top edge of the screen to the window in pixels.
Width int64 `json:"width,omitempty,omitzero"` // The window width in pixels.
Height int64 `json:"height,omitempty,omitzero"` // The window height in pixels.
WindowState WindowState `json:"windowState,omitempty,omitzero"` // The window state. Default to normal.
}
Bounds browser window bounds information.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bounds
type Bucket ¶
type Bucket struct {
Low int64 `json:"low"` // Minimum value (inclusive).
High int64 `json:"high"` // Maximum value (exclusive).
Count int64 `json:"count"` // Number of samples.
}
Bucket chrome histogram bucket.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bucket
type CancelDownloadParams ¶
type CancelDownloadParams struct {
GUID string `json:"guid"` // Global unique identifier of the download.
BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty,omitzero"` // BrowserContext to perform the action in. When omitted, default browser context is used.
}
CancelDownloadParams are the parameters of the command Browser.cancelDownload.
type CommandID ¶
type CommandID string
CommandID browser command ids used by executeBrowserCommand.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-BrowserCommandId
type DownloadProgressState ¶ added in v0.157.1
type DownloadProgressState string
DownloadProgressState download status.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
const ( DownloadProgressStateInProgress DownloadProgressState = "inProgress" DownloadProgressStateCompleted DownloadProgressState = "completed" DownloadProgressStateCanceled DownloadProgressState = "canceled" )
DownloadProgressState values.
func (DownloadProgressState) String ¶ added in v0.157.1
func (t DownloadProgressState) String() string
String returns the DownloadProgressState as string value.
type EventDownloadProgress ¶
type EventDownloadProgress struct {
GUID string `json:"guid"` // Global unique identifier of the download.
TotalBytes float64 `json:"totalBytes"` // Total expected bytes to download.
ReceivedBytes float64 `json:"receivedBytes"` // Total bytes received.
State DownloadProgressState `json:"state"` // Download status.
FilePath string `json:"filePath,omitempty,omitzero"` // If download is "completed", provides the path of the downloaded file. Depending on the platform, it is not guaranteed to be set, nor the file is guaranteed to exist.
}
EventDownloadProgress fired when download makes progress. Last call has |done| == true.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
type EventDownloadWillBegin ¶
type EventDownloadWillBegin struct {
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that caused the download to begin.
GUID string `json:"guid"` // Global unique identifier of the download.
URL string `json:"url"` // URL of the resource being downloaded.
SuggestedFilename string `json:"suggestedFilename"` // Suggested file name of the resource (the actual name of the file saved on disk may differ).
}
EventDownloadWillBegin fired when page is about to start a download.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadWillBegin
type ExecuteBrowserCommandParams ¶
type ExecuteBrowserCommandParams struct {
CommandID CommandID `json:"commandId"`
}
ExecuteBrowserCommandParams are the parameters of the command Browser.executeBrowserCommand.
type GetBrowserCommandLineResult ¶ added in v0.157.3
type GetBrowserCommandLineResult struct {
Arguments []string `json:"arguments,omitempty,omitzero"` // Commandline parameters
}
GetBrowserCommandLineResult is the result of the command Browser.getBrowserCommandLine.
type GetGlobalPrivacyControlResult ¶ added in v0.157.3
type GetGlobalPrivacyControlResult struct {
Gpc bool `json:"gpc"`
}
GetGlobalPrivacyControlResult is the result of the command Browser.getGlobalPrivacyControl.
type GetHistogramParams ¶
type GetHistogramParams struct {
Name string `json:"name"` // Requested histogram name.
Delta *bool `json:"delta,omitempty,omitzero"` // If true, retrieve delta since last delta call.
}
GetHistogramParams are the parameters of the command Browser.getHistogram.
type GetHistogramResult ¶ added in v0.157.3
type GetHistogramResult struct {
Histogram *Histogram `json:"histogram,omitempty,omitzero"` // Histogram.
}
GetHistogramResult is the result of the command Browser.getHistogram.
type GetHistogramsParams ¶
type GetHistogramsParams struct {
Query string `json:"query,omitempty,omitzero"` // Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
Delta *bool `json:"delta,omitempty,omitzero"` // If true, retrieve delta since last delta call.
}
GetHistogramsParams are the parameters of the command Browser.getHistograms.
type GetHistogramsResult ¶ added in v0.157.3
type GetHistogramsResult struct {
Histograms []*Histogram `json:"histograms,omitempty,omitzero"` // Histograms.
}
GetHistogramsResult is the result of the command Browser.getHistograms.
type GetVersionResult ¶ added in v0.157.3
type GetVersionResult struct {
ProtocolVersion string `json:"protocolVersion,omitempty,omitzero"` // Protocol version.
Product string `json:"product,omitempty,omitzero"` // Product name.
Revision string `json:"revision,omitempty,omitzero"` // Product revision.
UserAgent string `json:"userAgent,omitempty,omitzero"` // User-Agent.
JsVersion string `json:"jsVersion,omitempty,omitzero"` // V8 version.
}
GetVersionResult is the result of the command Browser.getVersion.
type GetWindowBoundsParams ¶
type GetWindowBoundsParams struct {
WindowID WindowID `json:"windowId"` // Browser window id.
}
GetWindowBoundsParams are the parameters of the command Browser.getWindowBounds.
type GetWindowBoundsResult ¶ added in v0.157.3
type GetWindowBoundsResult struct {
Bounds *Bounds `json:"bounds,omitempty,omitzero"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
}
GetWindowBoundsResult is the result of the command Browser.getWindowBounds.
type GetWindowForTargetParams ¶
type GetWindowForTargetParams struct {
TargetID target.ID `json:"targetId,omitempty,omitzero"` // Devtools agent host id. If called as a part of the session, associated targetId is used.
}
GetWindowForTargetParams are the parameters of the command Browser.getWindowForTarget.
type GetWindowForTargetResult ¶ added in v0.157.3
type GetWindowForTargetResult struct {
WindowID WindowID `json:"windowId,omitempty,omitzero"` // Browser window id.
Bounds *Bounds `json:"bounds,omitempty,omitzero"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
}
GetWindowForTargetResult is the result of the command Browser.getWindowForTarget.
type Histogram ¶
type Histogram struct {
Name string `json:"name"` // Name.
Sum int64 `json:"sum"` // Sum of sample values.
Count int64 `json:"count"` // Total number of samples.
Buckets []*Bucket `json:"buckets"` // Buckets.
}
Histogram chrome histogram.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Histogram
type PermissionDescriptor ¶
type PermissionDescriptor struct {
Name string `json:"name"` // Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
Sysex bool `json:"sysex"` // For "midi" permission, may also specify sysex control.
UserVisibleOnly bool `json:"userVisibleOnly"` // For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
AllowWithoutSanitization bool `json:"allowWithoutSanitization"` // For "clipboard" permission, may specify allowWithoutSanitization.
AllowWithoutGesture bool `json:"allowWithoutGesture"` // For "fullscreen" permission, must specify allowWithoutGesture:true.
PanTiltZoom bool `json:"panTiltZoom"` // For "camera" permission, may specify panTiltZoom.
}
PermissionDescriptor definition of PermissionDescriptor defined in the Permissions API: https://w3c.github.io/permissions/#dom-permissiondescriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionDescriptor
type PermissionSetting ¶
type PermissionSetting string
PermissionSetting [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionSetting
const ( PermissionSettingGranted PermissionSetting = "granted" PermissionSettingDenied PermissionSetting = "denied" PermissionSettingPrompt PermissionSetting = "prompt" )
PermissionSetting values.
func (PermissionSetting) String ¶
func (t PermissionSetting) String() string
String returns the PermissionSetting as string value.
type PermissionType ¶
type PermissionType string
PermissionType [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionType
const ( PermissionTypeAr PermissionType = "ar" PermissionTypeAudioCapture PermissionType = "audioCapture" PermissionTypeAutomaticFullscreen PermissionType = "automaticFullscreen" PermissionTypeBackgroundFetch PermissionType = "backgroundFetch" PermissionTypeBackgroundSync PermissionType = "backgroundSync" PermissionTypeCameraPanTiltZoom PermissionType = "cameraPanTiltZoom" PermissionTypeCapturedSurfaceControl PermissionType = "capturedSurfaceControl" PermissionTypeClipboardReadWrite PermissionType = "clipboardReadWrite" PermissionTypeClipboardSanitizedWrite PermissionType = "clipboardSanitizedWrite" PermissionTypeDisplayCapture PermissionType = "displayCapture" PermissionTypeDurableStorage PermissionType = "durableStorage" PermissionTypeGeolocation PermissionType = "geolocation" PermissionTypeHandTracking PermissionType = "handTracking" PermissionTypeIdleDetection PermissionType = "idleDetection" PermissionTypeKeyboardLock PermissionType = "keyboardLock" PermissionTypeLocalFonts PermissionType = "localFonts" PermissionTypeLocalNetwork PermissionType = "localNetwork" PermissionTypeLocalNetworkAccess PermissionType = "localNetworkAccess" PermissionTypeLoopbackNetwork PermissionType = "loopbackNetwork" PermissionTypeMidi PermissionType = "midi" PermissionTypeMidiSysex PermissionType = "midiSysex" PermissionTypeNfc PermissionType = "nfc" PermissionTypeNotifications PermissionType = "notifications" PermissionTypePaymentHandler PermissionType = "paymentHandler" PermissionTypePeriodicBackgroundSync PermissionType = "periodicBackgroundSync" PermissionTypePointerLock PermissionType = "pointerLock" PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier" PermissionTypeSensors PermissionType = "sensors" PermissionTypeSmartCard PermissionType = "smartCard" PermissionTypeSpeakerSelection PermissionType = "speakerSelection" PermissionTypeStorageAccess PermissionType = "storageAccess" PermissionTypeTopLevelStorageAccess PermissionType = "topLevelStorageAccess" PermissionTypeVideoCapture PermissionType = "videoCapture" PermissionTypeVr PermissionType = "vr" PermissionTypeWakeLockScreen PermissionType = "wakeLockScreen" PermissionTypeWakeLockSystem PermissionType = "wakeLockSystem" PermissionTypeWebAppInstallation PermissionType = "webAppInstallation" PermissionTypeWebPrinting PermissionType = "webPrinting" PermissionTypeWindowManagement PermissionType = "windowManagement" )
PermissionType values.
func (PermissionType) String ¶
func (t PermissionType) String() string
String returns the PermissionType as string value.
type ResetPermissionsParams ¶
type ResetPermissionsParams struct {
BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty,omitzero"` // BrowserContext to reset permissions. When omitted, default browser context is used.
}
ResetPermissionsParams are the parameters of the command Browser.resetPermissions.
type SetContentsSizeParams ¶
type SetContentsSizeParams struct {
WindowID WindowID `json:"windowId"` // Browser window id.
Width int64 `json:"width,omitempty,omitzero"` // The window contents width in DIP. Assumes current width if omitted. Must be specified if 'height' is omitted.
Height int64 `json:"height,omitempty,omitzero"` // The window contents height in DIP. Assumes current height if omitted. Must be specified if 'width' is omitted.
}
SetContentsSizeParams are the parameters of the command Browser.setContentsSize.
type SetDockTileParams ¶
type SetDockTileParams struct {
BadgeLabel string `json:"badgeLabel,omitempty,omitzero"`
Image []byte `json:"image,omitempty,omitzero"` // Png encoded image.
}
SetDockTileParams are the parameters of the command Browser.setDockTile.
type SetDownloadBehaviorBehavior ¶ added in v0.157.1
type SetDownloadBehaviorBehavior string
SetDownloadBehaviorBehavior whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
const ( SetDownloadBehaviorBehaviorDeny SetDownloadBehaviorBehavior = "deny" SetDownloadBehaviorBehaviorAllow SetDownloadBehaviorBehavior = "allow" SetDownloadBehaviorBehaviorAllowAndName SetDownloadBehaviorBehavior = "allowAndName" SetDownloadBehaviorBehaviorDefault SetDownloadBehaviorBehavior = "default" )
SetDownloadBehaviorBehavior values.
func (SetDownloadBehaviorBehavior) String ¶ added in v0.157.1
func (t SetDownloadBehaviorBehavior) String() string
String returns the SetDownloadBehaviorBehavior as string value.
type SetDownloadBehaviorParams ¶
type SetDownloadBehaviorParams struct {
Behavior SetDownloadBehaviorBehavior `json:"behavior"` // Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.
BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty,omitzero"` // BrowserContext to set download behavior. When omitted, default browser context is used.
DownloadPath string `json:"downloadPath,omitempty,omitzero"` // The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.
EventsEnabled *bool `json:"eventsEnabled,omitempty,omitzero"` // Whether to emit download events (defaults to false).
}
SetDownloadBehaviorParams are the parameters of the command Browser.setDownloadBehavior.
type SetGlobalPrivacyControlParams ¶
type SetGlobalPrivacyControlParams struct {
Gpc bool `json:"gpc"`
}
SetGlobalPrivacyControlParams are the parameters of the command Browser.setGlobalPrivacyControl.
type SetGlobalPrivacyControlResult ¶ added in v0.157.3
type SetGlobalPrivacyControlResult struct {
Gpc bool `json:"gpc"`
}
SetGlobalPrivacyControlResult is the result of the command Browser.setGlobalPrivacyControl.
type SetPermissionParams ¶
type SetPermissionParams struct {
Permission *PermissionDescriptor `json:"permission"` // Descriptor of permission to override.
Setting PermissionSetting `json:"setting"` // Setting of the permission.
Origin string `json:"origin,omitempty,omitzero"` // Embedding origin the permission applies to, all origins if not specified.
EmbeddedOrigin string `json:"embeddedOrigin,omitempty,omitzero"` // Embedded origin the permission applies to. It is ignored unless the embedding origin is present and valid. If the embedding origin is provided but the embedded origin isn't, the embedding origin is used as the embedded origin.
BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty,omitzero"` // Context to override. When omitted, default browser context is used.
}
SetPermissionParams are the parameters of the command Browser.setPermission.
type SetWindowBoundsParams ¶
type SetWindowBoundsParams struct {
WindowID WindowID `json:"windowId"` // Browser window id.
Bounds *Bounds `json:"bounds"` // New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
}
SetWindowBoundsParams are the parameters of the command Browser.setWindowBounds.
type WindowID ¶
type WindowID int64
WindowID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowID
type WindowState ¶
type WindowState string
WindowState the state of the browser window.
See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowState
const ( WindowStateNormal WindowState = "normal" WindowStateMinimized WindowState = "minimized" WindowStateMaximized WindowState = "maximized" WindowStateFullscreen WindowState = "fullscreen" )
WindowState values.
func (WindowState) String ¶
func (t WindowState) String() string
String returns the WindowState as string value.