page

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 8 Imported by: 100

Documentation

Overview

Package page implements the Page domain. Actions and events related to the inspected page belong to the page domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Page domain with the connection set to conn.

Types

type AdFrameExplanation added in v0.32.0

type AdFrameExplanation string

AdFrameExplanation

Note: This type is experimental.

const (
	AdFrameExplanationNotSet              AdFrameExplanation = ""
	AdFrameExplanationParentIsAd          AdFrameExplanation = "ParentIsAd"
	AdFrameExplanationCreatedByAdScript   AdFrameExplanation = "CreatedByAdScript"
	AdFrameExplanationMatchedBlockingRule AdFrameExplanation = "MatchedBlockingRule"
)

AdFrameExplanation as enums.

func (AdFrameExplanation) String added in v0.32.0

func (e AdFrameExplanation) String() string

func (AdFrameExplanation) Valid added in v0.32.0

func (e AdFrameExplanation) Valid() bool

type AdFrameStatus added in v0.32.0

type AdFrameStatus struct {
	AdFrameType  AdFrameType          `json:"adFrameType"`            // No description.
	Explanations []AdFrameExplanation `json:"explanations,omitempty"` // No description.
}

AdFrameStatus Indicates whether a frame has been identified as an ad and why.

Note: This type is experimental.

type AdFrameType added in v0.31.0

type AdFrameType string

AdFrameType Indicates whether a frame has been identified as an ad.

Note: This type is experimental.

const (
	AdFrameTypeNotSet AdFrameType = ""
	AdFrameTypeNone   AdFrameType = "none"
	AdFrameTypeChild  AdFrameType = "child"
	AdFrameTypeRoot   AdFrameType = "root"
)

AdFrameType as enums.

func (AdFrameType) String added in v0.31.0

func (e AdFrameType) String() string

func (AdFrameType) Valid added in v0.31.0

func (e AdFrameType) Valid() bool

type AddCompilationCacheArgs added in v0.18.6

type AddCompilationCacheArgs struct {
	URL  string `json:"url"`  // No description.
	Data []byte `json:"data"` // Base64-encoded data (Encoded as a base64 string when passed over JSON)
}

AddCompilationCacheArgs represents the arguments for AddCompilationCache in the Page domain.

func NewAddCompilationCacheArgs added in v0.18.6

func NewAddCompilationCacheArgs(url string, data []byte) *AddCompilationCacheArgs

NewAddCompilationCacheArgs initializes AddCompilationCacheArgs with the required arguments.

type AddScriptToEvaluateOnLoadArgs

type AddScriptToEvaluateOnLoadArgs struct {
	ScriptSource string `json:"scriptSource"` // No description.
}

AddScriptToEvaluateOnLoadArgs represents the arguments for AddScriptToEvaluateOnLoad in the Page domain.

func NewAddScriptToEvaluateOnLoadArgs

func NewAddScriptToEvaluateOnLoadArgs(scriptSource string) *AddScriptToEvaluateOnLoadArgs

NewAddScriptToEvaluateOnLoadArgs initializes AddScriptToEvaluateOnLoadArgs with the required arguments.

type AddScriptToEvaluateOnLoadReply

type AddScriptToEvaluateOnLoadReply struct {
	Identifier ScriptIdentifier `json:"identifier"` // Identifier of the added script.
}

AddScriptToEvaluateOnLoadReply represents the return values for AddScriptToEvaluateOnLoad in the Page domain.

type AddScriptToEvaluateOnNewDocumentArgs

type AddScriptToEvaluateOnNewDocumentArgs struct {
	Source string `json:"source"` // No description.
	// WorldName If specified, creates an isolated world with the given
	// name and evaluates given script in it. This world name will be used
	// as the ExecutionContextDescription::name when the corresponding
	// event is emitted.
	//
	// Note: This property is experimental.
	WorldName *string `json:"worldName,omitempty"`
	// IncludeCommandLineAPI Specifies whether command line API should be
	// available to the script, defaults to false.
	//
	// Note: This property is experimental.
	IncludeCommandLineAPI *bool `json:"includeCommandLineAPI,omitempty"`
}

AddScriptToEvaluateOnNewDocumentArgs represents the arguments for AddScriptToEvaluateOnNewDocument in the Page domain.

func NewAddScriptToEvaluateOnNewDocumentArgs

func NewAddScriptToEvaluateOnNewDocumentArgs(source string) *AddScriptToEvaluateOnNewDocumentArgs

NewAddScriptToEvaluateOnNewDocumentArgs initializes AddScriptToEvaluateOnNewDocumentArgs with the required arguments.

func (*AddScriptToEvaluateOnNewDocumentArgs) SetIncludeCommandLineAPI added in v0.32.0

func (a *AddScriptToEvaluateOnNewDocumentArgs) SetIncludeCommandLineAPI(includeCommandLineAPI bool) *AddScriptToEvaluateOnNewDocumentArgs

SetIncludeCommandLineAPI sets the IncludeCommandLineAPI optional argument. Specifies whether command line API should be available to the script, defaults to false.

Note: This property is experimental.

func (*AddScriptToEvaluateOnNewDocumentArgs) SetWorldName added in v0.19.1

SetWorldName sets the WorldName optional argument. If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.

Note: This property is experimental.

type AddScriptToEvaluateOnNewDocumentReply

type AddScriptToEvaluateOnNewDocumentReply struct {
	Identifier ScriptIdentifier `json:"identifier"` // Identifier of the added script.
}

AddScriptToEvaluateOnNewDocumentReply represents the return values for AddScriptToEvaluateOnNewDocument in the Page domain.

type AppManifestError

type AppManifestError struct {
	Message  string `json:"message"`  // Error message.
	Critical int    `json:"critical"` // If criticial, this is a non-recoverable parse error.
	Line     int    `json:"line"`     // Error line.
	Column   int    `json:"column"`   // Error column.
}

AppManifestError Error while paring app manifest.

type AppManifestParsedProperties added in v0.26.0

type AppManifestParsedProperties struct {
	Scope string `json:"scope"` // Computed scope value
}

AppManifestParsedProperties Parsed app manifest properties.

Note: This type is experimental.

type BackForwardCacheNotRestoredExplanation added in v0.32.0

type BackForwardCacheNotRestoredExplanation struct {
	Type   BackForwardCacheNotRestoredReasonType `json:"type"`   // Type of the reason
	Reason BackForwardCacheNotRestoredReason     `json:"reason"` // Not restored reason
}

BackForwardCacheNotRestoredExplanation

Note: This type is experimental.

type BackForwardCacheNotRestoredReason added in v0.32.0

type BackForwardCacheNotRestoredReason string

BackForwardCacheNotRestoredReason List of not restored reasons for back-forward cache.

Note: This type is experimental.

const (
	BackForwardCacheNotRestoredReasonNotSet                                              BackForwardCacheNotRestoredReason = ""
	BackForwardCacheNotRestoredReasonNotMainFrame                                        BackForwardCacheNotRestoredReason = "NotMainFrame"
	BackForwardCacheNotRestoredReasonBackForwardCacheDisabled                            BackForwardCacheNotRestoredReason = "BackForwardCacheDisabled"
	BackForwardCacheNotRestoredReasonRelatedActiveContentsExist                          BackForwardCacheNotRestoredReason = "RelatedActiveContentsExist"
	BackForwardCacheNotRestoredReasonHTTPStatusNotOK                                     BackForwardCacheNotRestoredReason = "HTTPStatusNotOK"
	BackForwardCacheNotRestoredReasonSchemeNotHTTPOrHTTPS                                BackForwardCacheNotRestoredReason = "SchemeNotHTTPOrHTTPS"
	BackForwardCacheNotRestoredReasonLoading                                             BackForwardCacheNotRestoredReason = "Loading"
	BackForwardCacheNotRestoredReasonWasGrantedMediaAccess                               BackForwardCacheNotRestoredReason = "WasGrantedMediaAccess"
	BackForwardCacheNotRestoredReasonDisableForRenderFrameHostCalled                     BackForwardCacheNotRestoredReason = "DisableForRenderFrameHostCalled"
	BackForwardCacheNotRestoredReasonDomainNotAllowed                                    BackForwardCacheNotRestoredReason = "DomainNotAllowed"
	BackForwardCacheNotRestoredReasonHTTPMethodNotGET                                    BackForwardCacheNotRestoredReason = "HTTPMethodNotGET"
	BackForwardCacheNotRestoredReasonSubframeIsNavigating                                BackForwardCacheNotRestoredReason = "SubframeIsNavigating"
	BackForwardCacheNotRestoredReasonTimeout                                             BackForwardCacheNotRestoredReason = "Timeout"
	BackForwardCacheNotRestoredReasonCacheLimit                                          BackForwardCacheNotRestoredReason = "CacheLimit"
	BackForwardCacheNotRestoredReasonJavaScriptExecution                                 BackForwardCacheNotRestoredReason = "JavaScriptExecution"
	BackForwardCacheNotRestoredReasonRendererProcessKilled                               BackForwardCacheNotRestoredReason = "RendererProcessKilled"
	BackForwardCacheNotRestoredReasonRendererProcessCrashed                              BackForwardCacheNotRestoredReason = "RendererProcessCrashed"
	BackForwardCacheNotRestoredReasonGrantedMediaStreamAccess                            BackForwardCacheNotRestoredReason = "GrantedMediaStreamAccess"
	BackForwardCacheNotRestoredReasonSchedulerTrackedFeatureUsed                         BackForwardCacheNotRestoredReason = "SchedulerTrackedFeatureUsed"
	BackForwardCacheNotRestoredReasonConflictingBrowsingInstance                         BackForwardCacheNotRestoredReason = "ConflictingBrowsingInstance"
	BackForwardCacheNotRestoredReasonCacheFlushed                                        BackForwardCacheNotRestoredReason = "CacheFlushed"
	BackForwardCacheNotRestoredReasonServiceWorkerVersionActivation                      BackForwardCacheNotRestoredReason = "ServiceWorkerVersionActivation"
	BackForwardCacheNotRestoredReasonSessionRestored                                     BackForwardCacheNotRestoredReason = "SessionRestored"
	BackForwardCacheNotRestoredReasonServiceWorkerPostMessage                            BackForwardCacheNotRestoredReason = "ServiceWorkerPostMessage"
	BackForwardCacheNotRestoredReasonEnteredBackForwardCacheBeforeServiceWorkerHostAdded BackForwardCacheNotRestoredReason = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded"
	BackForwardCacheNotRestoredReasonRenderFrameHostReusedSameSite                       BackForwardCacheNotRestoredReason = "RenderFrameHostReused_SameSite"
	BackForwardCacheNotRestoredReasonRenderFrameHostReusedCrossSite                      BackForwardCacheNotRestoredReason = "RenderFrameHostReused_CrossSite"
	BackForwardCacheNotRestoredReasonServiceWorkerClaim                                  BackForwardCacheNotRestoredReason = "ServiceWorkerClaim"
	BackForwardCacheNotRestoredReasonIgnoreEventAndEvict                                 BackForwardCacheNotRestoredReason = "IgnoreEventAndEvict"
	BackForwardCacheNotRestoredReasonHaveInnerContents                                   BackForwardCacheNotRestoredReason = "HaveInnerContents"
	BackForwardCacheNotRestoredReasonTimeoutPuttingInCache                               BackForwardCacheNotRestoredReason = "TimeoutPuttingInCache"
	BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByLowMemory                 BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByLowMemory"
	BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByCommandLine               BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByCommandLine"
	BackForwardCacheNotRestoredReasonNetworkRequestDatapipeDrainedAsBytesConsumer        BackForwardCacheNotRestoredReason = "NetworkRequestDatapipeDrainedAsBytesConsumer"
	BackForwardCacheNotRestoredReasonNetworkRequestRedirected                            BackForwardCacheNotRestoredReason = "NetworkRequestRedirected"
	BackForwardCacheNotRestoredReasonNetworkRequestTimeout                               BackForwardCacheNotRestoredReason = "NetworkRequestTimeout"
	BackForwardCacheNotRestoredReasonNetworkExceedsBufferLimit                           BackForwardCacheNotRestoredReason = "NetworkExceedsBufferLimit"
	BackForwardCacheNotRestoredReasonNavigationCancelledWhileRestoring                   BackForwardCacheNotRestoredReason = "NavigationCancelledWhileRestoring"
	BackForwardCacheNotRestoredReasonNotMostRecentNavigationEntry                        BackForwardCacheNotRestoredReason = "NotMostRecentNavigationEntry"
	BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForPrerender                BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForPrerender"
	BackForwardCacheNotRestoredReasonUserAgentOverrideDiffers                            BackForwardCacheNotRestoredReason = "UserAgentOverrideDiffers"
	BackForwardCacheNotRestoredReasonForegroundCacheLimit                                BackForwardCacheNotRestoredReason = "ForegroundCacheLimit"
	BackForwardCacheNotRestoredReasonBrowsingInstanceNotSwapped                          BackForwardCacheNotRestoredReason = "BrowsingInstanceNotSwapped"
	BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForDelegate                 BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForDelegate"
	BackForwardCacheNotRestoredReasonOptInUnloadHeaderNotPresent                         BackForwardCacheNotRestoredReason = "OptInUnloadHeaderNotPresent"
	BackForwardCacheNotRestoredReasonUnloadHandlerExistsInSubFrame                       BackForwardCacheNotRestoredReason = "UnloadHandlerExistsInSubFrame"
	BackForwardCacheNotRestoredReasonServiceWorkerUnregistration                         BackForwardCacheNotRestoredReason = "ServiceWorkerUnregistration"
	BackForwardCacheNotRestoredReasonCacheControlNoStore                                 BackForwardCacheNotRestoredReason = "CacheControlNoStore"
	BackForwardCacheNotRestoredReasonCacheControlNoStoreCookieModified                   BackForwardCacheNotRestoredReason = "CacheControlNoStoreCookieModified"
	BackForwardCacheNotRestoredReasonCacheControlNoStoreHTTPOnlyCookieModified           BackForwardCacheNotRestoredReason = "CacheControlNoStoreHTTPOnlyCookieModified"
	BackForwardCacheNotRestoredReasonWebSocket                                           BackForwardCacheNotRestoredReason = "WebSocket"
	BackForwardCacheNotRestoredReasonWebRTC                                              BackForwardCacheNotRestoredReason = "WebRTC"
	BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoStore                  BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoStore"
	BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoCache                  BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoCache"
	BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoStore                   BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoStore"
	BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache                   BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoCache"
	BackForwardCacheNotRestoredReasonContainsPlugins                                     BackForwardCacheNotRestoredReason = "ContainsPlugins"
	BackForwardCacheNotRestoredReasonDocumentLoaded                                      BackForwardCacheNotRestoredReason = "DocumentLoaded"
	BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet                            BackForwardCacheNotRestoredReason = "DedicatedWorkerOrWorklet"
	BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers                     BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers"
	BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction                     BackForwardCacheNotRestoredReason = "OutstandingIndexedDBTransaction"
	BackForwardCacheNotRestoredReasonRequestedNotificationsPermission                    BackForwardCacheNotRestoredReason = "RequestedNotificationsPermission"
	BackForwardCacheNotRestoredReasonRequestedMIDIPermission                             BackForwardCacheNotRestoredReason = "RequestedMIDIPermission"
	BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission                     BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission"
	BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission                     BackForwardCacheNotRestoredReason = "RequestedVideoCapturePermission"
	BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors             BackForwardCacheNotRestoredReason = "RequestedBackForwardCacheBlockedSensors"
	BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission                   BackForwardCacheNotRestoredReason = "RequestedBackgroundWorkPermission"
	BackForwardCacheNotRestoredReasonBroadcastChannel                                    BackForwardCacheNotRestoredReason = "BroadcastChannel"
	BackForwardCacheNotRestoredReasonIndexedDBConnection                                 BackForwardCacheNotRestoredReason = "IndexedDBConnection"
	BackForwardCacheNotRestoredReasonWebXR                                               BackForwardCacheNotRestoredReason = "WebXR"
	BackForwardCacheNotRestoredReasonSharedWorker                                        BackForwardCacheNotRestoredReason = "SharedWorker"
	BackForwardCacheNotRestoredReasonWebLocks                                            BackForwardCacheNotRestoredReason = "WebLocks"
	BackForwardCacheNotRestoredReasonWebHID                                              BackForwardCacheNotRestoredReason = "WebHID"
	BackForwardCacheNotRestoredReasonWebShare                                            BackForwardCacheNotRestoredReason = "WebShare"
	BackForwardCacheNotRestoredReasonRequestedStorageAccessGrant                         BackForwardCacheNotRestoredReason = "RequestedStorageAccessGrant"
	BackForwardCacheNotRestoredReasonWebNFC                                              BackForwardCacheNotRestoredReason = "WebNfc"
	BackForwardCacheNotRestoredReasonWebFileSystem                                       BackForwardCacheNotRestoredReason = "WebFileSystem"
	BackForwardCacheNotRestoredReasonOutstandingNetworkRequestFetch                      BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestFetch"
	BackForwardCacheNotRestoredReasonOutstandingNetworkRequestXHR                        BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestXHR"
	BackForwardCacheNotRestoredReasonAppBanner                                           BackForwardCacheNotRestoredReason = "AppBanner"
	BackForwardCacheNotRestoredReasonPrinting                                            BackForwardCacheNotRestoredReason = "Printing"
	BackForwardCacheNotRestoredReasonWebDatabase                                         BackForwardCacheNotRestoredReason = "WebDatabase"
	BackForwardCacheNotRestoredReasonPictureInPicture                                    BackForwardCacheNotRestoredReason = "PictureInPicture"
	BackForwardCacheNotRestoredReasonPortal                                              BackForwardCacheNotRestoredReason = "Portal"
	BackForwardCacheNotRestoredReasonSpeechRecognizer                                    BackForwardCacheNotRestoredReason = "SpeechRecognizer"
	BackForwardCacheNotRestoredReasonIdleManager                                         BackForwardCacheNotRestoredReason = "IdleManager"
	BackForwardCacheNotRestoredReasonPaymentManager                                      BackForwardCacheNotRestoredReason = "PaymentManager"
	BackForwardCacheNotRestoredReasonSpeechSynthesis                                     BackForwardCacheNotRestoredReason = "SpeechSynthesis"
	BackForwardCacheNotRestoredReasonKeyboardLock                                        BackForwardCacheNotRestoredReason = "KeyboardLock"
	BackForwardCacheNotRestoredReasonWebOTPService                                       BackForwardCacheNotRestoredReason = "WebOTPService"
	BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket               BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestDirectSocket"
	BackForwardCacheNotRestoredReasonIsolatedWorldScript                                 BackForwardCacheNotRestoredReason = "IsolatedWorldScript"
	BackForwardCacheNotRestoredReasonInjectedStyleSheet                                  BackForwardCacheNotRestoredReason = "InjectedStyleSheet"
	BackForwardCacheNotRestoredReasonMediaSessionImplOnServiceCreated                    BackForwardCacheNotRestoredReason = "MediaSessionImplOnServiceCreated"
	BackForwardCacheNotRestoredReasonUnknown                                             BackForwardCacheNotRestoredReason = "Unknown"
)

BackForwardCacheNotRestoredReason as enums.

func (BackForwardCacheNotRestoredReason) String added in v0.32.0

func (BackForwardCacheNotRestoredReason) Valid added in v0.32.0

type BackForwardCacheNotRestoredReasonType added in v0.32.0

type BackForwardCacheNotRestoredReasonType string

BackForwardCacheNotRestoredReasonType Types of not restored reasons for back-forward cache.

Note: This type is experimental.

const (
	BackForwardCacheNotRestoredReasonTypeNotSet            BackForwardCacheNotRestoredReasonType = ""
	BackForwardCacheNotRestoredReasonTypeSupportPending    BackForwardCacheNotRestoredReasonType = "SupportPending"
	BackForwardCacheNotRestoredReasonTypePageSupportNeeded BackForwardCacheNotRestoredReasonType = "PageSupportNeeded"
	BackForwardCacheNotRestoredReasonTypeCircumstantial    BackForwardCacheNotRestoredReasonType = "Circumstantial"
)

BackForwardCacheNotRestoredReasonType as enums.

func (BackForwardCacheNotRestoredReasonType) String added in v0.32.0

func (BackForwardCacheNotRestoredReasonType) Valid added in v0.32.0

type BackForwardCacheNotUsedClient added in v0.32.0

type BackForwardCacheNotUsedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*BackForwardCacheNotUsedReply, error)
	rpcc.Stream
}

BackForwardCacheNotUsedClient is a client for BackForwardCacheNotUsed events. Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.

type BackForwardCacheNotUsedReply added in v0.32.0

type BackForwardCacheNotUsedReply struct {
	LoaderID                network.LoaderID                         `json:"loaderId"`                // The loader id for the associated navgation.
	FrameID                 FrameID                                  `json:"frameId"`                 // The frame id of the associated frame.
	NotRestoredExplanations []BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty.
}

BackForwardCacheNotUsedReply is the reply for BackForwardCacheNotUsed events.

type CaptureScreenshotArgs

type CaptureScreenshotArgs struct {
	// Format Image compression format (defaults to png).
	//
	// Values: "jpeg", "png", "webp".
	Format  *string   `json:"format,omitempty"`
	Quality *int      `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
	Clip    *Viewport `json:"clip,omitempty"`    // Capture the screenshot of a given region only.
	// FromSurface Capture the screenshot from the surface, rather than
	// the view. Defaults to true.
	//
	// Note: This property is experimental.
	FromSurface *bool `json:"fromSurface,omitempty"`
	// CaptureBeyondViewport Capture the screenshot beyond the viewport.
	// Defaults to false.
	//
	// Note: This property is experimental.
	CaptureBeyondViewport *bool `json:"captureBeyondViewport,omitempty"`
}

CaptureScreenshotArgs represents the arguments for CaptureScreenshot in the Page domain.

func NewCaptureScreenshotArgs

func NewCaptureScreenshotArgs() *CaptureScreenshotArgs

NewCaptureScreenshotArgs initializes CaptureScreenshotArgs with the required arguments.

func (*CaptureScreenshotArgs) SetCaptureBeyondViewport added in v0.31.0

func (a *CaptureScreenshotArgs) SetCaptureBeyondViewport(captureBeyondViewport bool) *CaptureScreenshotArgs

SetCaptureBeyondViewport sets the CaptureBeyondViewport optional argument. Capture the screenshot beyond the viewport. Defaults to false.

Note: This property is experimental.

func (*CaptureScreenshotArgs) SetClip added in v0.9.1

SetClip sets the Clip optional argument. Capture the screenshot of a given region only.

func (*CaptureScreenshotArgs) SetFormat

func (a *CaptureScreenshotArgs) SetFormat(format string) *CaptureScreenshotArgs

SetFormat sets the Format optional argument. Image compression format (defaults to png).

Values: "jpeg", "png", "webp".

func (*CaptureScreenshotArgs) SetFromSurface

func (a *CaptureScreenshotArgs) SetFromSurface(fromSurface bool) *CaptureScreenshotArgs

SetFromSurface sets the FromSurface optional argument. Capture the screenshot from the surface, rather than the view. Defaults to true.

Note: This property is experimental.

func (*CaptureScreenshotArgs) SetQuality

func (a *CaptureScreenshotArgs) SetQuality(quality int) *CaptureScreenshotArgs

SetQuality sets the Quality optional argument. Compression quality from range [0..100] (jpeg only).

type CaptureScreenshotReply

type CaptureScreenshotReply struct {
	Data []byte `json:"data"` // Base64-encoded image data. (Encoded as a base64 string when passed over JSON)
}

CaptureScreenshotReply represents the return values for CaptureScreenshot in the Page domain.

type CaptureSnapshotArgs added in v0.21.0

type CaptureSnapshotArgs struct {
	// Format Format (defaults to mhtml).
	//
	// Values: "mhtml".
	Format *string `json:"format,omitempty"`
}

CaptureSnapshotArgs represents the arguments for CaptureSnapshot in the Page domain.

func NewCaptureSnapshotArgs added in v0.21.0

func NewCaptureSnapshotArgs() *CaptureSnapshotArgs

NewCaptureSnapshotArgs initializes CaptureSnapshotArgs with the required arguments.

func (*CaptureSnapshotArgs) SetFormat added in v0.21.0

func (a *CaptureSnapshotArgs) SetFormat(format string) *CaptureSnapshotArgs

SetFormat sets the Format optional argument. Format (defaults to mhtml).

Values: "mhtml".

type CaptureSnapshotReply added in v0.21.0

type CaptureSnapshotReply struct {
	Data string `json:"data"` // Serialized page data.
}

CaptureSnapshotReply represents the return values for CaptureSnapshot in the Page domain.

type ClientNavigationDisposition added in v0.29.0

type ClientNavigationDisposition string

ClientNavigationDisposition

Note: This type is experimental.

const (
	ClientNavigationDispositionNotSet     ClientNavigationDisposition = ""
	ClientNavigationDispositionCurrentTab ClientNavigationDisposition = "currentTab"
	ClientNavigationDispositionNewTab     ClientNavigationDisposition = "newTab"
	ClientNavigationDispositionNewWindow  ClientNavigationDisposition = "newWindow"
	ClientNavigationDispositionDownload   ClientNavigationDisposition = "download"
)

ClientNavigationDisposition as enums.

func (ClientNavigationDisposition) String added in v0.29.0

func (ClientNavigationDisposition) Valid added in v0.29.0

type ClientNavigationReason added in v0.23.0

type ClientNavigationReason string

ClientNavigationReason

Note: This type is experimental.

const (
	ClientNavigationReasonNotSet                ClientNavigationReason = ""
	ClientNavigationReasonFormSubmissionGet     ClientNavigationReason = "formSubmissionGet"
	ClientNavigationReasonFormSubmissionPost    ClientNavigationReason = "formSubmissionPost"
	ClientNavigationReasonHTTPHeaderRefresh     ClientNavigationReason = "httpHeaderRefresh"
	ClientNavigationReasonScriptInitiated       ClientNavigationReason = "scriptInitiated"
	ClientNavigationReasonMetaTagRefresh        ClientNavigationReason = "metaTagRefresh"
	ClientNavigationReasonPageBlockInterstitial ClientNavigationReason = "pageBlockInterstitial"
	ClientNavigationReasonReload                ClientNavigationReason = "reload"
	ClientNavigationReasonAnchorClick           ClientNavigationReason = "anchorClick"
)

ClientNavigationReason as enums.

func (ClientNavigationReason) String added in v0.23.0

func (e ClientNavigationReason) String() string

func (ClientNavigationReason) Valid added in v0.23.0

func (e ClientNavigationReason) Valid() bool

type CompilationCacheParams added in v0.31.0

type CompilationCacheParams struct {
	URL   string `json:"url"`             // The URL of the script to produce a compilation cache entry for.
	Eager *bool  `json:"eager,omitempty"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).
}

CompilationCacheParams Per-script compilation cache parameters for `Page.produceCompilationCache`

Note: This type is experimental.

type CompilationCacheProducedClient added in v0.18.6

type CompilationCacheProducedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*CompilationCacheProducedReply, error)
	rpcc.Stream
}

CompilationCacheProducedClient is a client for CompilationCacheProduced events. Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.

type CompilationCacheProducedReply added in v0.18.6

type CompilationCacheProducedReply struct {
	URL  string `json:"url"`  // No description.
	Data []byte `json:"data"` // Base64-encoded data (Encoded as a base64 string when passed over JSON)
}

CompilationCacheProducedReply is the reply for CompilationCacheProduced events.

type CreateIsolatedWorldArgs

type CreateIsolatedWorldArgs struct {
	FrameID             FrameID `json:"frameId"`                       // Id of the frame in which the isolated world should be created.
	WorldName           *string `json:"worldName,omitempty"`           // An optional name which is reported in the Execution Context.
	GrantUniveralAccess *bool   `json:"grantUniveralAccess,omitempty"` // Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
}

CreateIsolatedWorldArgs represents the arguments for CreateIsolatedWorld in the Page domain.

func NewCreateIsolatedWorldArgs

func NewCreateIsolatedWorldArgs(frameID FrameID) *CreateIsolatedWorldArgs

NewCreateIsolatedWorldArgs initializes CreateIsolatedWorldArgs with the required arguments.

func (*CreateIsolatedWorldArgs) SetGrantUniveralAccess

func (a *CreateIsolatedWorldArgs) SetGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldArgs

SetGrantUniveralAccess sets the GrantUniveralAccess optional argument. Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.

func (*CreateIsolatedWorldArgs) SetWorldName

func (a *CreateIsolatedWorldArgs) SetWorldName(worldName string) *CreateIsolatedWorldArgs

SetWorldName sets the WorldName optional argument. An optional name which is reported in the Execution Context.

type CreateIsolatedWorldReply

type CreateIsolatedWorldReply struct {
	ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Execution context of the isolated world.
}

CreateIsolatedWorldReply represents the return values for CreateIsolatedWorld in the Page domain.

type CrossOriginIsolatedContextType added in v0.31.0

type CrossOriginIsolatedContextType string

CrossOriginIsolatedContextType Indicates whether the frame is cross-origin isolated and why it is the case.

Note: This type is experimental.

const (
	CrossOriginIsolatedContextTypeNotSet                     CrossOriginIsolatedContextType = ""
	CrossOriginIsolatedContextTypeIsolated                   CrossOriginIsolatedContextType = "Isolated"
	CrossOriginIsolatedContextTypeNotIsolated                CrossOriginIsolatedContextType = "NotIsolated"
	CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled CrossOriginIsolatedContextType = "NotIsolatedFeatureDisabled"
)

CrossOriginIsolatedContextType as enums.

func (CrossOriginIsolatedContextType) String added in v0.31.0

func (CrossOriginIsolatedContextType) Valid added in v0.31.0

type DOMContentEventFiredClient

type DOMContentEventFiredClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*DOMContentEventFiredReply, error)
	rpcc.Stream
}

DOMContentEventFiredClient is a client for DOMContentEventFired events.

type DOMContentEventFiredReply

type DOMContentEventFiredReply struct {
	Timestamp network.MonotonicTime `json:"timestamp"` // No description.
}

DOMContentEventFiredReply is the reply for DOMContentEventFired events.

type DialogType

type DialogType string

DialogType Javascript dialog type.

const (
	DialogTypeNotSet       DialogType = ""
	DialogTypeAlert        DialogType = "alert"
	DialogTypeConfirm      DialogType = "confirm"
	DialogTypePrompt       DialogType = "prompt"
	DialogTypeBeforeunload DialogType = "beforeunload"
)

DialogType as enums.

func (DialogType) String

func (e DialogType) String() string

func (DialogType) Valid

func (e DialogType) Valid() bool

type DocumentOpenedClient added in v0.31.0

type DocumentOpenedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*DocumentOpenedReply, error)
	rpcc.Stream
}

DocumentOpenedClient is a client for DocumentOpened events. Fired when opening document to write to.

type DocumentOpenedReply added in v0.31.0

type DocumentOpenedReply struct {
	Frame Frame `json:"frame"` // Frame object.
}

DocumentOpenedReply is the reply for DocumentOpened events.

type DownloadProgressClient added in v0.26.0

type DownloadProgressClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*DownloadProgressReply, error)
	rpcc.Stream
}

DownloadProgressClient is a client for DownloadProgress events. Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.

type DownloadProgressReply added in v0.26.0

type DownloadProgressReply 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 Download status.
	//
	// Values: "inProgress", "completed", "canceled".
	State string `json:"state"`
}

DownloadProgressReply is the reply for DownloadProgress events.

type DownloadWillBeginClient added in v0.23.2

type DownloadWillBeginClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*DownloadWillBeginReply, error)
	rpcc.Stream
}

DownloadWillBeginClient is a client for DownloadWillBegin events. Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.

type DownloadWillBeginReply added in v0.23.2

type DownloadWillBeginReply struct {
	FrameID           FrameID `json:"frameId"`           // Id of the frame that caused 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).
}

DownloadWillBeginReply is the reply for DownloadWillBegin events.

type FileChooserOpenedClient added in v0.24.1

type FileChooserOpenedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FileChooserOpenedReply, error)
	rpcc.Stream
}

FileChooserOpenedClient is a client for FileChooserOpened events. Emitted only when `page.interceptFileChooser` is enabled.

type FileChooserOpenedReply added in v0.24.1

type FileChooserOpenedReply struct {
	// FrameID Id of the frame containing input node.
	//
	// Note: This property is experimental.
	FrameID FrameID `json:"frameId"`
	// BackendNodeID Input node id.
	//
	// Note: This property is experimental.
	BackendNodeID dom.BackendNodeID `json:"backendNodeId"`
	// Mode Input mode.
	//
	// Values: "selectSingle", "selectMultiple".
	Mode string `json:"mode"`
}

FileChooserOpenedReply is the reply for FileChooserOpened events.

type FontFamilies added in v0.18.4

type FontFamilies struct {
	Standard   *string `json:"standard,omitempty"`   // The standard font-family.
	Fixed      *string `json:"fixed,omitempty"`      // The fixed font-family.
	Serif      *string `json:"serif,omitempty"`      // The serif font-family.
	SansSerif  *string `json:"sansSerif,omitempty"`  // The sansSerif font-family.
	Cursive    *string `json:"cursive,omitempty"`    // The cursive font-family.
	Fantasy    *string `json:"fantasy,omitempty"`    // The fantasy font-family.
	Pictograph *string `json:"pictograph,omitempty"` // The pictograph font-family.
}

FontFamilies Generic font families collection.

Note: This type is experimental.

type FontSizes added in v0.18.4

type FontSizes struct {
	Standard *int `json:"standard,omitempty"` // Default standard font size.
	Fixed    *int `json:"fixed,omitempty"`    // Default fixed font size.
}

FontSizes Default font sizes.

Note: This type is experimental.

type Frame

type Frame struct {
	ID       FrameID          `json:"id"`                 // Frame unique identifier.
	ParentID *FrameID         `json:"parentId,omitempty"` // Parent frame identifier.
	LoaderID network.LoaderID `json:"loaderId"`           // Identifier of the loader associated with this frame.
	Name     *string          `json:"name,omitempty"`     // Frame's name as specified in the tag.
	URL      string           `json:"url"`                // Frame document's URL without fragment.
	// URLFragment Frame document's URL fragment including the '#'.
	//
	// Note: This property is experimental.
	URLFragment *string `json:"urlFragment,omitempty"`
	// DomainAndRegistry Frame document's registered domain, taking the
	// public suffixes list into account. Extracted from the Frame's url.
	// Example URLs: http://www.google.com/file.html -> "google.com"
	// http://a.b.co.uk/file.html -> "b.co.uk"
	//
	// Note: This property is experimental.
	DomainAndRegistry string `json:"domainAndRegistry"`
	SecurityOrigin    string `json:"securityOrigin"` // Frame document's security origin.
	MimeType          string `json:"mimeType"`       // Frame document's mimeType as determined by the browser.
	// UnreachableURL If the frame failed to load, this contains the URL
	// that could not be loaded. Note that unlike url above, this URL may
	// contain a fragment.
	//
	// Note: This property is experimental.
	UnreachableURL *string `json:"unreachableUrl,omitempty"`
	// AdFrameStatus Indicates whether this frame was tagged as an ad and
	// why.
	//
	// Note: This property is experimental.
	AdFrameStatus *AdFrameStatus `json:"adFrameStatus,omitempty"`
	// SecureContextType Indicates whether the main document is a secure
	// context and explains why that is the case.
	//
	// Note: This property is experimental.
	SecureContextType SecureContextType `json:"secureContextType"`
	// CrossOriginIsolatedContextType Indicates whether this is a cross
	// origin isolated context.
	//
	// Note: This property is experimental.
	CrossOriginIsolatedContextType CrossOriginIsolatedContextType `json:"crossOriginIsolatedContextType"`
	// GatedAPIFeatures Indicated which gated APIs / features are
	// available.
	//
	// Note: This property is experimental.
	GatedAPIFeatures []GatedAPIFeatures `json:"gatedAPIFeatures"`
	// OriginTrials Frame document's origin trials with at least one token
	// present.
	//
	// Note: This property is experimental.
	OriginTrials []OriginTrial `json:"originTrials,omitempty"`
}

Frame Information about the Frame on the page.

type FrameAttachedClient

type FrameAttachedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameAttachedReply, error)
	rpcc.Stream
}

FrameAttachedClient is a client for FrameAttached events. Fired when frame has been attached to its parent.

type FrameAttachedReply

type FrameAttachedReply struct {
	FrameID       FrameID             `json:"frameId"`         // Id of the frame that has been attached.
	ParentFrameID FrameID             `json:"parentFrameId"`   // Parent frame identifier.
	Stack         *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
}

FrameAttachedReply is the reply for FrameAttached events.

type FrameClearedScheduledNavigationClient

type FrameClearedScheduledNavigationClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameClearedScheduledNavigationReply, error)
	rpcc.Stream
}

FrameClearedScheduledNavigationClient is a client for FrameClearedScheduledNavigation events. Fired when frame no longer has a scheduled navigation.

type FrameClearedScheduledNavigationReply

type FrameClearedScheduledNavigationReply struct {
	FrameID FrameID `json:"frameId"` // Id of the frame that has cleared its scheduled navigation.
}

FrameClearedScheduledNavigationReply is the reply for FrameClearedScheduledNavigation events.

type FrameDetachedClient

type FrameDetachedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameDetachedReply, error)
	rpcc.Stream
}

FrameDetachedClient is a client for FrameDetached events. Fired when frame has been detached from its parent.

type FrameDetachedReply

type FrameDetachedReply struct {
	FrameID FrameID `json:"frameId"` // Id of the frame that has been detached.
	// Reason
	//
	// Values: "remove", "swap".
	//
	// Note: This property is experimental.
	Reason string `json:"reason"`
}

FrameDetachedReply is the reply for FrameDetached events.

type FrameID

type FrameID = internal.PageFrameID

FrameID Unique frame identifier.

type FrameNavigatedClient

type FrameNavigatedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameNavigatedReply, error)
	rpcc.Stream
}

FrameNavigatedClient is a client for FrameNavigated events. Fired once navigation of the frame has completed. Frame is now associated with the new loader.

type FrameNavigatedReply

type FrameNavigatedReply struct {
	Frame Frame `json:"frame"` // Frame object.
	// Type
	//
	// Note: This property is experimental.
	Type NavigationType `json:"type"`
}

FrameNavigatedReply is the reply for FrameNavigated events.

type FrameRequestedNavigationClient added in v0.23.0

type FrameRequestedNavigationClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameRequestedNavigationReply, error)
	rpcc.Stream
}

FrameRequestedNavigationClient is a client for FrameRequestedNavigation events. Fired when a renderer-initiated navigation is requested. Navigation may still be canceled after the event is issued.

type FrameRequestedNavigationReply added in v0.23.0

type FrameRequestedNavigationReply struct {
	FrameID     FrameID                     `json:"frameId"`     // Id of the frame that is being navigated.
	Reason      ClientNavigationReason      `json:"reason"`      // The reason for the navigation.
	URL         string                      `json:"url"`         // The destination URL for the requested navigation.
	Disposition ClientNavigationDisposition `json:"disposition"` // The disposition for the navigation.
}

FrameRequestedNavigationReply is the reply for FrameRequestedNavigation events.

type FrameResizedClient

type FrameResizedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameResizedReply, error)
	rpcc.Stream
}

FrameResizedClient is a client for FrameResized events.

type FrameResizedReply

type FrameResizedReply struct {
}

FrameResizedReply is the reply for FrameResized events.

type FrameResource

type FrameResource struct {
	URL          string                 `json:"url"`                    // Resource URL.
	Type         network.ResourceType   `json:"type"`                   // Type of this resource.
	MimeType     string                 `json:"mimeType"`               // Resource mimeType as determined by the browser.
	LastModified network.TimeSinceEpoch `json:"lastModified,omitempty"` // last-modified timestamp as reported by server.
	ContentSize  *float64               `json:"contentSize,omitempty"`  // Resource content size.
	Failed       *bool                  `json:"failed,omitempty"`       // True if the resource failed to load.
	Canceled     *bool                  `json:"canceled,omitempty"`     // True if the resource was canceled during loading.
}

FrameResource Information about the Resource on the page.

Note: This type is experimental.

type FrameResourceTree

type FrameResourceTree struct {
	Frame       Frame               `json:"frame"`                 // Frame information for this tree item.
	ChildFrames []FrameResourceTree `json:"childFrames,omitempty"` // Child frames.
	Resources   []FrameResource     `json:"resources"`             // Information about frame resources.
}

FrameResourceTree Information about the Frame hierarchy along with their cached resources.

Note: This type is experimental.

type FrameScheduledNavigationClient

type FrameScheduledNavigationClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameScheduledNavigationReply, error)
	rpcc.Stream
}

FrameScheduledNavigationClient is a client for FrameScheduledNavigation events. Fired when frame schedules a potential navigation.

type FrameScheduledNavigationReply

type FrameScheduledNavigationReply struct {
	FrameID FrameID                `json:"frameId"` // Id of the frame that has scheduled a navigation.
	Delay   float64                `json:"delay"`   // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
	Reason  ClientNavigationReason `json:"reason"`  // The reason for the navigation.
	URL     string                 `json:"url"`     // The destination URL for the scheduled navigation.
}

FrameScheduledNavigationReply is the reply for FrameScheduledNavigation events.

type FrameStartedLoadingClient

type FrameStartedLoadingClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameStartedLoadingReply, error)
	rpcc.Stream
}

FrameStartedLoadingClient is a client for FrameStartedLoading events. Fired when frame has started loading.

type FrameStartedLoadingReply

type FrameStartedLoadingReply struct {
	FrameID FrameID `json:"frameId"` // Id of the frame that has started loading.
}

FrameStartedLoadingReply is the reply for FrameStartedLoading events.

type FrameStoppedLoadingClient

type FrameStoppedLoadingClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FrameStoppedLoadingReply, error)
	rpcc.Stream
}

FrameStoppedLoadingClient is a client for FrameStoppedLoading events. Fired when frame has stopped loading.

type FrameStoppedLoadingReply

type FrameStoppedLoadingReply struct {
	FrameID FrameID `json:"frameId"` // Id of the frame that has stopped loading.
}

FrameStoppedLoadingReply is the reply for FrameStoppedLoading events.

type FrameTree added in v0.14.2

type FrameTree struct {
	Frame       Frame       `json:"frame"`                 // Frame information for this tree item.
	ChildFrames []FrameTree `json:"childFrames,omitempty"` // Child frames.
}

FrameTree Information about the Frame hierarchy.

type GatedAPIFeatures added in v0.31.0

type GatedAPIFeatures string

GatedAPIFeatures

Note: This type is experimental.

const (
	GatedAPIFeaturesNotSet                            GatedAPIFeatures = ""
	GatedAPIFeaturesSharedArrayBuffers                GatedAPIFeatures = "SharedArrayBuffers"
	GatedAPIFeaturesSharedArrayBuffersTransferAllowed GatedAPIFeatures = "SharedArrayBuffersTransferAllowed"
	GatedAPIFeaturesPerformanceMeasureMemory          GatedAPIFeatures = "PerformanceMeasureMemory"
	GatedAPIFeaturesPerformanceProfile                GatedAPIFeatures = "PerformanceProfile"
)

GatedAPIFeatures as enums.

func (GatedAPIFeatures) String added in v0.31.0

func (e GatedAPIFeatures) String() string

func (GatedAPIFeatures) Valid added in v0.31.0

func (e GatedAPIFeatures) Valid() bool

type GenerateTestReportArgs added in v0.19.0

type GenerateTestReportArgs struct {
	Message string  `json:"message"`         // Message to be displayed in the report.
	Group   *string `json:"group,omitempty"` // Specifies the endpoint group to deliver the report to.
}

GenerateTestReportArgs represents the arguments for GenerateTestReport in the Page domain.

func NewGenerateTestReportArgs added in v0.19.0

func NewGenerateTestReportArgs(message string) *GenerateTestReportArgs

NewGenerateTestReportArgs initializes GenerateTestReportArgs with the required arguments.

func (*GenerateTestReportArgs) SetGroup added in v0.19.0

SetGroup sets the Group optional argument. Specifies the endpoint group to deliver the report to.

type GetAppManifestReply

type GetAppManifestReply struct {
	URL    string             `json:"url"`            // Manifest location.
	Errors []AppManifestError `json:"errors"`         // No description.
	Data   *string            `json:"data,omitempty"` // Manifest content.
	// Parsed Parsed manifest properties
	//
	// Note: This property is experimental.
	Parsed *AppManifestParsedProperties `json:"parsed,omitempty"`
}

GetAppManifestReply represents the return values for GetAppManifest in the Page domain.

type GetFrameTreeReply added in v0.14.2

type GetFrameTreeReply struct {
	FrameTree FrameTree `json:"frameTree"` // Present frame tree structure.
}

GetFrameTreeReply represents the return values for GetFrameTree in the Page domain.

type GetInstallabilityErrorsReply added in v0.23.1

type GetInstallabilityErrorsReply struct {
	InstallabilityErrors []InstallabilityError `json:"installabilityErrors"` // No description.
}

GetInstallabilityErrorsReply represents the return values for GetInstallabilityErrors in the Page domain.

type GetLayoutMetricsReply

type GetLayoutMetricsReply struct {
	// LayoutViewport is deprecated.
	//
	// Deprecated: Deprecated metrics relating to the layout viewport. Can
	// be in DP or in CSS pixels depending on the `enable-use-zoom-for-dsf`
	// flag. Use `cssLayoutViewport` instead.
	LayoutViewport LayoutViewport `json:"layoutViewport"`
	// VisualViewport is deprecated.
	//
	// Deprecated: Deprecated metrics relating to the visual viewport. Can
	// be in DP or in CSS pixels depending on the `enable-use-zoom-for-dsf`
	// flag. Use `cssVisualViewport` instead.
	VisualViewport VisualViewport `json:"visualViewport"`
	// ContentSize is deprecated.
	//
	// Deprecated: Deprecated size of scrollable area. Can be in DP or in
	// CSS pixels depending on the `enable-use-zoom-for-dsf` flag. Use
	// `cssContentSize` instead.
	ContentSize       dom.Rect       `json:"contentSize"`
	CSSLayoutViewport LayoutViewport `json:"cssLayoutViewport"` // Metrics relating to the layout viewport in CSS pixels.
	CSSVisualViewport VisualViewport `json:"cssVisualViewport"` // Metrics relating to the visual viewport in CSS pixels.
	CSSContentSize    dom.Rect       `json:"cssContentSize"`    // Size of scrollable area in CSS pixels.
}

GetLayoutMetricsReply represents the return values for GetLayoutMetrics in the Page domain.

type GetManifestIconsReply added in v0.26.0

type GetManifestIconsReply struct {
	PrimaryIcon *string `json:"primaryIcon,omitempty"` // No description.
}

GetManifestIconsReply represents the return values for GetManifestIcons in the Page domain.

type GetNavigationHistoryReply

type GetNavigationHistoryReply struct {
	CurrentIndex int               `json:"currentIndex"` // Index of the current navigation history entry.
	Entries      []NavigationEntry `json:"entries"`      // Array of navigation history entries.
}

GetNavigationHistoryReply represents the return values for GetNavigationHistory in the Page domain.

type GetPermissionsPolicyStateArgs added in v0.31.0

type GetPermissionsPolicyStateArgs struct {
	FrameID FrameID `json:"frameId"` // No description.
}

GetPermissionsPolicyStateArgs represents the arguments for GetPermissionsPolicyState in the Page domain.

func NewGetPermissionsPolicyStateArgs added in v0.31.0

func NewGetPermissionsPolicyStateArgs(frameID FrameID) *GetPermissionsPolicyStateArgs

NewGetPermissionsPolicyStateArgs initializes GetPermissionsPolicyStateArgs with the required arguments.

type GetPermissionsPolicyStateReply added in v0.31.0

type GetPermissionsPolicyStateReply struct {
	States []PermissionsPolicyFeatureState `json:"states"` // No description.
}

GetPermissionsPolicyStateReply represents the return values for GetPermissionsPolicyState in the Page domain.

type GetResourceContentArgs

type GetResourceContentArgs struct {
	FrameID FrameID `json:"frameId"` // Frame id to get resource for.
	URL     string  `json:"url"`     // URL of the resource to get content for.
}

GetResourceContentArgs represents the arguments for GetResourceContent in the Page domain.

func NewGetResourceContentArgs

func NewGetResourceContentArgs(frameID FrameID, url string) *GetResourceContentArgs

NewGetResourceContentArgs initializes GetResourceContentArgs with the required arguments.

type GetResourceContentReply

type GetResourceContentReply struct {
	Content       string `json:"content"`       // Resource content.
	Base64Encoded bool   `json:"base64Encoded"` // True, if content was served as base64.
}

GetResourceContentReply represents the return values for GetResourceContent in the Page domain.

type GetResourceTreeReply

type GetResourceTreeReply struct {
	FrameTree FrameResourceTree `json:"frameTree"` // Present frame / resource tree structure.
}

GetResourceTreeReply represents the return values for GetResourceTree in the Page domain.

type HandleJavaScriptDialogArgs

type HandleJavaScriptDialogArgs struct {
	Accept     bool    `json:"accept"`               // Whether to accept or dismiss the dialog.
	PromptText *string `json:"promptText,omitempty"` // The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
}

HandleJavaScriptDialogArgs represents the arguments for HandleJavaScriptDialog in the Page domain.

func NewHandleJavaScriptDialogArgs

func NewHandleJavaScriptDialogArgs(accept bool) *HandleJavaScriptDialogArgs

NewHandleJavaScriptDialogArgs initializes HandleJavaScriptDialogArgs with the required arguments.

func (*HandleJavaScriptDialogArgs) SetPromptText

func (a *HandleJavaScriptDialogArgs) SetPromptText(promptText string) *HandleJavaScriptDialogArgs

SetPromptText sets the PromptText optional argument. The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.

type InstallabilityError added in v0.26.0

type InstallabilityError struct {
	ErrorID        string                        `json:"errorId"`        // The error id (e.g. 'manifest-missing-suitable-icon').
	ErrorArguments []InstallabilityErrorArgument `json:"errorArguments"` // The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
}

InstallabilityError The installability error

Note: This type is experimental.

type InstallabilityErrorArgument added in v0.26.0

type InstallabilityErrorArgument struct {
	Name  string `json:"name"`  // Argument name (e.g. name:'minimum-icon-size-in-pixels').
	Value string `json:"value"` // Argument value (e.g. value:'64').
}

InstallabilityErrorArgument

Note: This type is experimental.

type InterstitialHiddenClient

type InterstitialHiddenClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*InterstitialHiddenReply, error)
	rpcc.Stream
}

InterstitialHiddenClient is a client for InterstitialHidden events. Fired when interstitial page was hidden

type InterstitialHiddenReply

type InterstitialHiddenReply struct {
}

InterstitialHiddenReply is the reply for InterstitialHidden events.

type InterstitialShownClient

type InterstitialShownClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*InterstitialShownReply, error)
	rpcc.Stream
}

InterstitialShownClient is a client for InterstitialShown events. Fired when interstitial page was shown

type InterstitialShownReply

type InterstitialShownReply struct {
}

InterstitialShownReply is the reply for InterstitialShown events.

type JavascriptDialogClosedClient

type JavascriptDialogClosedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*JavascriptDialogClosedReply, error)
	rpcc.Stream
}

JavascriptDialogClosedClient is a client for JavascriptDialogClosed events. Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

type JavascriptDialogClosedReply

type JavascriptDialogClosedReply struct {
	Result    bool   `json:"result"`    // Whether dialog was confirmed.
	UserInput string `json:"userInput"` // User input in case of prompt.
}

JavascriptDialogClosedReply is the reply for JavascriptDialogClosed events.

type JavascriptDialogOpeningClient

type JavascriptDialogOpeningClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*JavascriptDialogOpeningReply, error)
	rpcc.Stream
}

JavascriptDialogOpeningClient is a client for JavascriptDialogOpening events. Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

type JavascriptDialogOpeningReply

type JavascriptDialogOpeningReply struct {
	URL               string     `json:"url"`                     // Frame url.
	Message           string     `json:"message"`                 // Message that will be displayed by the dialog.
	Type              DialogType `json:"type"`                    // Dialog type.
	HasBrowserHandler bool       `json:"hasBrowserHandler"`       // True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
	DefaultPrompt     *string    `json:"defaultPrompt,omitempty"` // Default dialog prompt.
}

JavascriptDialogOpeningReply is the reply for JavascriptDialogOpening events.

type LayoutViewport

type LayoutViewport struct {
	PageX        int `json:"pageX"`        // Horizontal offset relative to the document (CSS pixels).
	PageY        int `json:"pageY"`        // Vertical offset relative to the document (CSS pixels).
	ClientWidth  int `json:"clientWidth"`  // Width (CSS pixels), excludes scrollbar if present.
	ClientHeight int `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
}

LayoutViewport Layout viewport position and dimensions.

type LifecycleEventClient added in v0.11.4

type LifecycleEventClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*LifecycleEventReply, error)
	rpcc.Stream
}

LifecycleEventClient is a client for LifecycleEvent events. Fired for top level page lifecycle events such as navigation, load, paint, etc.

type LifecycleEventReply added in v0.11.4

type LifecycleEventReply struct {
	FrameID   FrameID               `json:"frameId"`   // Id of the frame.
	LoaderID  network.LoaderID      `json:"loaderId"`  // Loader identifier. Empty string if the request is fetched from worker.
	Name      string                `json:"name"`      // No description.
	Timestamp network.MonotonicTime `json:"timestamp"` // No description.
}

LifecycleEventReply is the reply for LifecycleEvent events.

type LoadEventFiredClient

type LoadEventFiredClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*LoadEventFiredReply, error)
	rpcc.Stream
}

LoadEventFiredClient is a client for LoadEventFired events.

type LoadEventFiredReply

type LoadEventFiredReply struct {
	Timestamp network.MonotonicTime `json:"timestamp"` // No description.
}

LoadEventFiredReply is the reply for LoadEventFired events.

type NavigateArgs struct {
	URL            string         `json:"url"`                      // URL to navigate the page to.
	Referrer       *string        `json:"referrer,omitempty"`       // Referrer URL.
	TransitionType TransitionType `json:"transitionType,omitempty"` // Intended transition type.
	FrameID        *FrameID       `json:"frameId,omitempty"`        // Frame id to navigate, if not specified navigates the top frame.
	// ReferrerPolicy Referrer-policy used for the navigation.
	//
	// Note: This property is experimental.
	ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"`
}

NavigateArgs represents the arguments for Navigate in the Page domain.

func NewNavigateArgs

func NewNavigateArgs(url string) *NavigateArgs

NewNavigateArgs initializes NavigateArgs with the required arguments.

func (a *NavigateArgs) SetFrameID(frameID FrameID) *NavigateArgs

SetFrameID sets the FrameID optional argument. Frame id to navigate, if not specified navigates the top frame.

func (a *NavigateArgs) SetReferrer(referrer string) *NavigateArgs

SetReferrer sets the Referrer optional argument. Referrer URL.

func (a *NavigateArgs) SetReferrerPolicy(referrerPolicy ReferrerPolicy) *NavigateArgs

SetReferrerPolicy sets the ReferrerPolicy optional argument. Referrer-policy used for the navigation.

Note: This property is experimental.

func (a *NavigateArgs) SetTransitionType(transitionType TransitionType) *NavigateArgs

SetTransitionType sets the TransitionType optional argument. Intended transition type.

type NavigateReply struct {
	FrameID   FrameID           `json:"frameId"`             // Frame id that has navigated (or failed to navigate)
	LoaderID  *network.LoaderID `json:"loaderId,omitempty"`  // Loader identifier.
	ErrorText *string           `json:"errorText,omitempty"` // User friendly error message, present if and only if navigation has failed.
}

NavigateReply represents the return values for Navigate in the Page domain.

type NavigateToHistoryEntryArgs struct {
	EntryID int `json:"entryId"` // Unique id of the entry to navigate to.
}

NavigateToHistoryEntryArgs represents the arguments for NavigateToHistoryEntry in the Page domain.

func NewNavigateToHistoryEntryArgs

func NewNavigateToHistoryEntryArgs(entryID int) *NavigateToHistoryEntryArgs

NewNavigateToHistoryEntryArgs initializes NavigateToHistoryEntryArgs with the required arguments.

type NavigatedWithinDocumentClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*NavigatedWithinDocumentReply, error)
	rpcc.Stream
}

NavigatedWithinDocumentClient is a client for NavigatedWithinDocument events. Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.

type NavigatedWithinDocumentReply struct {
	FrameID FrameID `json:"frameId"` // Id of the frame.
	URL     string  `json:"url"`     // Frame's new url.
}

NavigatedWithinDocumentReply is the reply for NavigatedWithinDocument events.

type NavigationEntry struct {
	ID             int            `json:"id"`             // Unique id of the navigation history entry.
	URL            string         `json:"url"`            // URL of the navigation history entry.
	UserTypedURL   string         `json:"userTypedURL"`   // URL that the user typed in the url bar.
	Title          string         `json:"title"`          // Title of the navigation history entry.
	TransitionType TransitionType `json:"transitionType"` // Transition type.
}

NavigationEntry Navigation history entry.

type NavigationType string

NavigationType The type of a frameNavigated event.

Note: This type is experimental.

const (
	NavigationTypeNotSet                  NavigationType = ""
	NavigationTypeNavigation              NavigationType = "Navigation"
	NavigationTypeBackForwardCacheRestore NavigationType = "BackForwardCacheRestore"
)

NavigationType as enums.

func (e NavigationType) String() string
func (e NavigationType) Valid() bool

type OriginTrial added in v0.32.0

type OriginTrial struct {
	TrialName        string                       `json:"trialName"`        // No description.
	Status           OriginTrialStatus            `json:"status"`           // No description.
	TokensWithStatus []OriginTrialTokenWithStatus `json:"tokensWithStatus"` // No description.
}

OriginTrial

Note: This type is experimental.

type OriginTrialStatus added in v0.32.0

type OriginTrialStatus string

OriginTrialStatus Status for an Origin Trial.

Note: This type is experimental.

const (
	OriginTrialStatusNotSet                OriginTrialStatus = ""
	OriginTrialStatusEnabled               OriginTrialStatus = "Enabled"
	OriginTrialStatusValidTokenNotProvided OriginTrialStatus = "ValidTokenNotProvided"
	OriginTrialStatusOSNotSupported        OriginTrialStatus = "OSNotSupported"
	OriginTrialStatusTrialNotAllowed       OriginTrialStatus = "TrialNotAllowed"
)

OriginTrialStatus as enums.

func (OriginTrialStatus) String added in v0.32.0

func (e OriginTrialStatus) String() string

func (OriginTrialStatus) Valid added in v0.32.0

func (e OriginTrialStatus) Valid() bool

type OriginTrialToken added in v0.32.0

type OriginTrialToken struct {
	Origin           string                      `json:"origin"`           // No description.
	MatchSubDomains  bool                        `json:"matchSubDomains"`  // No description.
	TrialName        string                      `json:"trialName"`        // No description.
	ExpiryTime       network.TimeSinceEpoch      `json:"expiryTime"`       // No description.
	IsThirdParty     bool                        `json:"isThirdParty"`     // No description.
	UsageRestriction OriginTrialUsageRestriction `json:"usageRestriction"` // No description.
}

OriginTrialToken

Note: This type is experimental.

type OriginTrialTokenStatus added in v0.32.0

type OriginTrialTokenStatus string

OriginTrialTokenStatus Origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.

Note: This type is experimental.

const (
	OriginTrialTokenStatusNotSet                 OriginTrialTokenStatus = ""
	OriginTrialTokenStatusSuccess                OriginTrialTokenStatus = "Success"
	OriginTrialTokenStatusNotSupported           OriginTrialTokenStatus = "NotSupported"
	OriginTrialTokenStatusInsecure               OriginTrialTokenStatus = "Insecure"
	OriginTrialTokenStatusExpired                OriginTrialTokenStatus = "Expired"
	OriginTrialTokenStatusWrongOrigin            OriginTrialTokenStatus = "WrongOrigin"
	OriginTrialTokenStatusInvalidSignature       OriginTrialTokenStatus = "InvalidSignature"
	OriginTrialTokenStatusMalformed              OriginTrialTokenStatus = "Malformed"
	OriginTrialTokenStatusWrongVersion           OriginTrialTokenStatus = "WrongVersion"
	OriginTrialTokenStatusFeatureDisabled        OriginTrialTokenStatus = "FeatureDisabled"
	OriginTrialTokenStatusTokenDisabled          OriginTrialTokenStatus = "TokenDisabled"
	OriginTrialTokenStatusFeatureDisabledForUser OriginTrialTokenStatus = "FeatureDisabledForUser"
)

OriginTrialTokenStatus as enums.

func (OriginTrialTokenStatus) String added in v0.32.0

func (e OriginTrialTokenStatus) String() string

func (OriginTrialTokenStatus) Valid added in v0.32.0

func (e OriginTrialTokenStatus) Valid() bool

type OriginTrialTokenWithStatus added in v0.32.0

type OriginTrialTokenWithStatus struct {
	RawTokenText string                 `json:"rawTokenText"`          // No description.
	ParsedToken  *OriginTrialToken      `json:"parsedToken,omitempty"` // `parsedToken` is present only when the token is extractable and parsable.
	Status       OriginTrialTokenStatus `json:"status"`                // No description.
}

OriginTrialTokenWithStatus

Note: This type is experimental.

type OriginTrialUsageRestriction added in v0.32.0

type OriginTrialUsageRestriction string

OriginTrialUsageRestriction

Note: This type is experimental.

const (
	OriginTrialUsageRestrictionNotSet OriginTrialUsageRestriction = ""
	OriginTrialUsageRestrictionNone   OriginTrialUsageRestriction = "None"
	OriginTrialUsageRestrictionSubset OriginTrialUsageRestriction = "Subset"
)

OriginTrialUsageRestriction as enums.

func (OriginTrialUsageRestriction) String added in v0.32.0

func (OriginTrialUsageRestriction) Valid added in v0.32.0

type PermissionsPolicyBlockLocator added in v0.31.0

type PermissionsPolicyBlockLocator struct {
	FrameID     FrameID                      `json:"frameId"`     // No description.
	BlockReason PermissionsPolicyBlockReason `json:"blockReason"` // No description.
}

PermissionsPolicyBlockLocator

Note: This type is experimental.

type PermissionsPolicyBlockReason added in v0.31.0

type PermissionsPolicyBlockReason string

PermissionsPolicyBlockReason Reason for a permissions policy feature to be disabled.

Note: This type is experimental.

const (
	PermissionsPolicyBlockReasonNotSet          PermissionsPolicyBlockReason = ""
	PermissionsPolicyBlockReasonHeader          PermissionsPolicyBlockReason = "Header"
	PermissionsPolicyBlockReasonIframeAttribute PermissionsPolicyBlockReason = "IframeAttribute"
)

PermissionsPolicyBlockReason as enums.

func (PermissionsPolicyBlockReason) String added in v0.31.0

func (PermissionsPolicyBlockReason) Valid added in v0.31.0

type PermissionsPolicyFeature added in v0.31.0

type PermissionsPolicyFeature string

PermissionsPolicyFeature All Permissions Policy features. This enum should match the one defined in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.

Note: This type is experimental.

const (
	PermissionsPolicyFeatureNotSet                      PermissionsPolicyFeature = ""
	PermissionsPolicyFeatureAccelerometer               PermissionsPolicyFeature = "accelerometer"
	PermissionsPolicyFeatureAmbientLightSensor          PermissionsPolicyFeature = "ambient-light-sensor"
	PermissionsPolicyFeatureAttributionReporting        PermissionsPolicyFeature = "attribution-reporting"
	PermissionsPolicyFeatureAutoplay                    PermissionsPolicyFeature = "autoplay"
	PermissionsPolicyFeatureCamera                      PermissionsPolicyFeature = "camera"
	PermissionsPolicyFeatureChDpr                       PermissionsPolicyFeature = "ch-dpr"
	PermissionsPolicyFeatureChDeviceMemory              PermissionsPolicyFeature = "ch-device-memory"
	PermissionsPolicyFeatureChDownlink                  PermissionsPolicyFeature = "ch-downlink"
	PermissionsPolicyFeatureChEct                       PermissionsPolicyFeature = "ch-ect"
	PermissionsPolicyFeatureChLang                      PermissionsPolicyFeature = "ch-lang"
	PermissionsPolicyFeatureChPrefersColorScheme        PermissionsPolicyFeature = "ch-prefers-color-scheme"
	PermissionsPolicyFeatureChRtt                       PermissionsPolicyFeature = "ch-rtt"
	PermissionsPolicyFeatureChUa                        PermissionsPolicyFeature = "ch-ua"
	PermissionsPolicyFeatureChUaArch                    PermissionsPolicyFeature = "ch-ua-arch"
	PermissionsPolicyFeatureChUaBitness                 PermissionsPolicyFeature = "ch-ua-bitness"
	PermissionsPolicyFeatureChUaPlatform                PermissionsPolicyFeature = "ch-ua-platform"
	PermissionsPolicyFeatureChUaModel                   PermissionsPolicyFeature = "ch-ua-model"
	PermissionsPolicyFeatureChUaMobile                  PermissionsPolicyFeature = "ch-ua-mobile"
	PermissionsPolicyFeatureChUaFullVersion             PermissionsPolicyFeature = "ch-ua-full-version"
	PermissionsPolicyFeatureChUaPlatformVersion         PermissionsPolicyFeature = "ch-ua-platform-version"
	PermissionsPolicyFeatureChViewportWidth             PermissionsPolicyFeature = "ch-viewport-width"
	PermissionsPolicyFeatureChWidth                     PermissionsPolicyFeature = "ch-width"
	PermissionsPolicyFeatureClipboardRead               PermissionsPolicyFeature = "clipboard-read"
	PermissionsPolicyFeatureClipboardWrite              PermissionsPolicyFeature = "clipboard-write"
	PermissionsPolicyFeatureCrossOriginIsolated         PermissionsPolicyFeature = "cross-origin-isolated"
	PermissionsPolicyFeatureDirectSockets               PermissionsPolicyFeature = "direct-sockets"
	PermissionsPolicyFeatureDisplayCapture              PermissionsPolicyFeature = "display-capture"
	PermissionsPolicyFeatureDocumentDomain              PermissionsPolicyFeature = "document-domain"
	PermissionsPolicyFeatureEncryptedMedia              PermissionsPolicyFeature = "encrypted-media"
	PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport"
	PermissionsPolicyFeatureExecutionWhileNotRendered   PermissionsPolicyFeature = "execution-while-not-rendered"
	PermissionsPolicyFeatureFocusWithoutUserActivation  PermissionsPolicyFeature = "focus-without-user-activation"
	PermissionsPolicyFeatureFullscreen                  PermissionsPolicyFeature = "fullscreen"
	PermissionsPolicyFeatureFrobulate                   PermissionsPolicyFeature = "frobulate"
	PermissionsPolicyFeatureGamepad                     PermissionsPolicyFeature = "gamepad"
	PermissionsPolicyFeatureGeolocation                 PermissionsPolicyFeature = "geolocation"
	PermissionsPolicyFeatureGyroscope                   PermissionsPolicyFeature = "gyroscope"
	PermissionsPolicyFeatureHid                         PermissionsPolicyFeature = "hid"
	PermissionsPolicyFeatureIdleDetection               PermissionsPolicyFeature = "idle-detection"
	PermissionsPolicyFeatureInterestCohort              PermissionsPolicyFeature = "interest-cohort"
	PermissionsPolicyFeatureMagnetometer                PermissionsPolicyFeature = "magnetometer"
	PermissionsPolicyFeatureMicrophone                  PermissionsPolicyFeature = "microphone"
	PermissionsPolicyFeatureMidi                        PermissionsPolicyFeature = "midi"
	PermissionsPolicyFeatureOtpCredentials              PermissionsPolicyFeature = "otp-credentials"
	PermissionsPolicyFeaturePayment                     PermissionsPolicyFeature = "payment"
	PermissionsPolicyFeaturePictureInPicture            PermissionsPolicyFeature = "picture-in-picture"
	PermissionsPolicyFeaturePublickeyCredentialsGet     PermissionsPolicyFeature = "publickey-credentials-get"
	PermissionsPolicyFeatureScreenWakeLock              PermissionsPolicyFeature = "screen-wake-lock"
	PermissionsPolicyFeatureSerial                      PermissionsPolicyFeature = "serial"
	PermissionsPolicyFeatureSharedAutofill              PermissionsPolicyFeature = "shared-autofill"
	PermissionsPolicyFeatureStorageAccessAPI            PermissionsPolicyFeature = "storage-access-api"
	PermissionsPolicyFeatureSyncXhr                     PermissionsPolicyFeature = "sync-xhr"
	PermissionsPolicyFeatureTrustTokenRedemption        PermissionsPolicyFeature = "trust-token-redemption"
	PermissionsPolicyFeatureUSB                         PermissionsPolicyFeature = "usb"
	PermissionsPolicyFeatureVerticalScroll              PermissionsPolicyFeature = "vertical-scroll"
	PermissionsPolicyFeatureWebShare                    PermissionsPolicyFeature = "web-share"
	PermissionsPolicyFeatureWindowPlacement             PermissionsPolicyFeature = "window-placement"
	PermissionsPolicyFeatureXrSpatialTracking           PermissionsPolicyFeature = "xr-spatial-tracking"
)

PermissionsPolicyFeature as enums.

func (PermissionsPolicyFeature) String added in v0.31.0

func (e PermissionsPolicyFeature) String() string

func (PermissionsPolicyFeature) Valid added in v0.31.0

func (e PermissionsPolicyFeature) Valid() bool

type PermissionsPolicyFeatureState added in v0.31.0

type PermissionsPolicyFeatureState struct {
	Feature PermissionsPolicyFeature       `json:"feature"`           // No description.
	Allowed bool                           `json:"allowed"`           // No description.
	Locator *PermissionsPolicyBlockLocator `json:"locator,omitempty"` // No description.
}

PermissionsPolicyFeatureState

Note: This type is experimental.

type PrintToPDFArgs

type PrintToPDFArgs struct {
	Landscape               *bool    `json:"landscape,omitempty"`               // Paper orientation. Defaults to false.
	DisplayHeaderFooter     *bool    `json:"displayHeaderFooter,omitempty"`     // Display header and footer. Defaults to false.
	PrintBackground         *bool    `json:"printBackground,omitempty"`         // Print background graphics. Defaults to false.
	Scale                   *float64 `json:"scale,omitempty"`                   // Scale of the webpage rendering. Defaults to 1.
	PaperWidth              *float64 `json:"paperWidth,omitempty"`              // Paper width in inches. Defaults to 8.5 inches.
	PaperHeight             *float64 `json:"paperHeight,omitempty"`             // Paper height in inches. Defaults to 11 inches.
	MarginTop               *float64 `json:"marginTop,omitempty"`               // Top margin in inches. Defaults to 1cm (~0.4 inches).
	MarginBottom            *float64 `json:"marginBottom,omitempty"`            // Bottom margin in inches. Defaults to 1cm (~0.4 inches).
	MarginLeft              *float64 `json:"marginLeft,omitempty"`              // Left margin in inches. Defaults to 1cm (~0.4 inches).
	MarginRight             *float64 `json:"marginRight,omitempty"`             // Right margin in inches. Defaults to 1cm (~0.4 inches).
	PageRanges              *string  `json:"pageRanges,omitempty"`              // Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
	IgnoreInvalidPageRanges *bool    `json:"ignoreInvalidPageRanges,omitempty"` // Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
	HeaderTemplate          *string  `json:"headerTemplate,omitempty"`          // HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document For example, `<span class=title></span>` would generate span containing the title.
	FooterTemplate          *string  `json:"footerTemplate,omitempty"`          // HTML template for the print footer. Should use the same format as the `headerTemplate`.
	PreferCSSPageSize       *bool    `json:"preferCSSPageSize,omitempty"`       // Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
	// TransferMode return as stream
	//
	// Values: "ReturnAsBase64", "ReturnAsStream".
	//
	// Note: This property is experimental.
	TransferMode *string `json:"transferMode,omitempty"`
}

PrintToPDFArgs represents the arguments for PrintToPDF in the Page domain.

func NewPrintToPDFArgs

func NewPrintToPDFArgs() *PrintToPDFArgs

NewPrintToPDFArgs initializes PrintToPDFArgs with the required arguments.

func (*PrintToPDFArgs) SetDisplayHeaderFooter

func (a *PrintToPDFArgs) SetDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFArgs

SetDisplayHeaderFooter sets the DisplayHeaderFooter optional argument. Display header and footer. Defaults to false.

func (*PrintToPDFArgs) SetFooterTemplate added in v0.15.4

func (a *PrintToPDFArgs) SetFooterTemplate(footerTemplate string) *PrintToPDFArgs

SetFooterTemplate sets the FooterTemplate optional argument. HTML template for the print footer. Should use the same format as the `headerTemplate`.

func (*PrintToPDFArgs) SetHeaderTemplate added in v0.15.4

func (a *PrintToPDFArgs) SetHeaderTemplate(headerTemplate string) *PrintToPDFArgs

SetHeaderTemplate sets the HeaderTemplate optional argument. HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document

For example, `<span class=title></span>` would generate span containing the title.

func (*PrintToPDFArgs) SetIgnoreInvalidPageRanges added in v0.9.1

func (a *PrintToPDFArgs) SetIgnoreInvalidPageRanges(ignoreInvalidPageRanges bool) *PrintToPDFArgs

SetIgnoreInvalidPageRanges sets the IgnoreInvalidPageRanges optional argument. Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.

func (*PrintToPDFArgs) SetLandscape

func (a *PrintToPDFArgs) SetLandscape(landscape bool) *PrintToPDFArgs

SetLandscape sets the Landscape optional argument. Paper orientation. Defaults to false.

func (*PrintToPDFArgs) SetMarginBottom

func (a *PrintToPDFArgs) SetMarginBottom(marginBottom float64) *PrintToPDFArgs

SetMarginBottom sets the MarginBottom optional argument. Bottom margin in inches. Defaults to 1cm (~0.4 inches).

func (*PrintToPDFArgs) SetMarginLeft

func (a *PrintToPDFArgs) SetMarginLeft(marginLeft float64) *PrintToPDFArgs

SetMarginLeft sets the MarginLeft optional argument. Left margin in inches. Defaults to 1cm (~0.4 inches).

func (*PrintToPDFArgs) SetMarginRight

func (a *PrintToPDFArgs) SetMarginRight(marginRight float64) *PrintToPDFArgs

SetMarginRight sets the MarginRight optional argument. Right margin in inches. Defaults to 1cm (~0.4 inches).

func (*PrintToPDFArgs) SetMarginTop

func (a *PrintToPDFArgs) SetMarginTop(marginTop float64) *PrintToPDFArgs

SetMarginTop sets the MarginTop optional argument. Top margin in inches. Defaults to 1cm (~0.4 inches).

func (*PrintToPDFArgs) SetPageRanges

func (a *PrintToPDFArgs) SetPageRanges(pageRanges string) *PrintToPDFArgs

SetPageRanges sets the PageRanges optional argument. Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.

func (*PrintToPDFArgs) SetPaperHeight

func (a *PrintToPDFArgs) SetPaperHeight(paperHeight float64) *PrintToPDFArgs

SetPaperHeight sets the PaperHeight optional argument. Paper height in inches. Defaults to 11 inches.

func (*PrintToPDFArgs) SetPaperWidth

func (a *PrintToPDFArgs) SetPaperWidth(paperWidth float64) *PrintToPDFArgs

SetPaperWidth sets the PaperWidth optional argument. Paper width in inches. Defaults to 8.5 inches.

func (*PrintToPDFArgs) SetPreferCSSPageSize added in v0.16.4

func (a *PrintToPDFArgs) SetPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFArgs

SetPreferCSSPageSize sets the PreferCSSPageSize optional argument. Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.

func (*PrintToPDFArgs) SetPrintBackground

func (a *PrintToPDFArgs) SetPrintBackground(printBackground bool) *PrintToPDFArgs

SetPrintBackground sets the PrintBackground optional argument. Print background graphics. Defaults to false.

func (*PrintToPDFArgs) SetScale

func (a *PrintToPDFArgs) SetScale(scale float64) *PrintToPDFArgs

SetScale sets the Scale optional argument. Scale of the webpage rendering. Defaults to 1.

func (*PrintToPDFArgs) SetTransferMode added in v0.23.4

func (a *PrintToPDFArgs) SetTransferMode(transferMode string) *PrintToPDFArgs

SetTransferMode sets the TransferMode optional argument. return as stream

Values: "ReturnAsBase64", "ReturnAsStream".

Note: This property is experimental.

type PrintToPDFReply

type PrintToPDFReply struct {
	Data []byte `json:"data"` // Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)
	// Stream A handle of the stream that holds resulting PDF data.
	//
	// Note: This property is experimental.
	Stream *io.StreamHandle `json:"stream,omitempty"`
}

PrintToPDFReply represents the return values for PrintToPDF in the Page domain.

type ProduceCompilationCacheArgs added in v0.31.0

type ProduceCompilationCacheArgs struct {
	Scripts []CompilationCacheParams `json:"scripts"` // No description.
}

ProduceCompilationCacheArgs represents the arguments for ProduceCompilationCache in the Page domain.

func NewProduceCompilationCacheArgs added in v0.31.0

func NewProduceCompilationCacheArgs(scripts []CompilationCacheParams) *ProduceCompilationCacheArgs

NewProduceCompilationCacheArgs initializes ProduceCompilationCacheArgs with the required arguments.

type ReferrerPolicy added in v0.26.0

type ReferrerPolicy string

ReferrerPolicy The referring-policy used for the navigation.

Note: This type is experimental.

const (
	ReferrerPolicyNotSet                      ReferrerPolicy = ""
	ReferrerPolicyNoReferrer                  ReferrerPolicy = "noReferrer"
	ReferrerPolicyNoReferrerWhenDowngrade     ReferrerPolicy = "noReferrerWhenDowngrade"
	ReferrerPolicyOrigin                      ReferrerPolicy = "origin"
	ReferrerPolicyOriginWhenCrossOrigin       ReferrerPolicy = "originWhenCrossOrigin"
	ReferrerPolicySameOrigin                  ReferrerPolicy = "sameOrigin"
	ReferrerPolicyStrictOrigin                ReferrerPolicy = "strictOrigin"
	ReferrerPolicyStrictOriginWhenCrossOrigin ReferrerPolicy = "strictOriginWhenCrossOrigin"
	ReferrerPolicyUnsafeURL                   ReferrerPolicy = "unsafeUrl"
)

ReferrerPolicy as enums.

func (ReferrerPolicy) String added in v0.26.0

func (e ReferrerPolicy) String() string

func (ReferrerPolicy) Valid added in v0.26.0

func (e ReferrerPolicy) Valid() bool

type ReloadArgs

type ReloadArgs struct {
	IgnoreCache            *bool   `json:"ignoreCache,omitempty"`            // If true, browser cache is ignored (as if the user pressed Shift+refresh).
	ScriptToEvaluateOnLoad *string `json:"scriptToEvaluateOnLoad,omitempty"` // If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
}

ReloadArgs represents the arguments for Reload in the Page domain.

func NewReloadArgs

func NewReloadArgs() *ReloadArgs

NewReloadArgs initializes ReloadArgs with the required arguments.

func (*ReloadArgs) SetIgnoreCache

func (a *ReloadArgs) SetIgnoreCache(ignoreCache bool) *ReloadArgs

SetIgnoreCache sets the IgnoreCache optional argument. If true, browser cache is ignored (as if the user pressed Shift+refresh).

func (*ReloadArgs) SetScriptToEvaluateOnLoad

func (a *ReloadArgs) SetScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) *ReloadArgs

SetScriptToEvaluateOnLoad sets the ScriptToEvaluateOnLoad optional argument. If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.

type RemoveScriptToEvaluateOnLoadArgs

type RemoveScriptToEvaluateOnLoadArgs struct {
	Identifier ScriptIdentifier `json:"identifier"` // No description.
}

RemoveScriptToEvaluateOnLoadArgs represents the arguments for RemoveScriptToEvaluateOnLoad in the Page domain.

func NewRemoveScriptToEvaluateOnLoadArgs

func NewRemoveScriptToEvaluateOnLoadArgs(identifier ScriptIdentifier) *RemoveScriptToEvaluateOnLoadArgs

NewRemoveScriptToEvaluateOnLoadArgs initializes RemoveScriptToEvaluateOnLoadArgs with the required arguments.

type RemoveScriptToEvaluateOnNewDocumentArgs

type RemoveScriptToEvaluateOnNewDocumentArgs struct {
	Identifier ScriptIdentifier `json:"identifier"` // No description.
}

RemoveScriptToEvaluateOnNewDocumentArgs represents the arguments for RemoveScriptToEvaluateOnNewDocument in the Page domain.

func NewRemoveScriptToEvaluateOnNewDocumentArgs

func NewRemoveScriptToEvaluateOnNewDocumentArgs(identifier ScriptIdentifier) *RemoveScriptToEvaluateOnNewDocumentArgs

NewRemoveScriptToEvaluateOnNewDocumentArgs initializes RemoveScriptToEvaluateOnNewDocumentArgs with the required arguments.

type ScreencastFrameAckArgs

type ScreencastFrameAckArgs struct {
	SessionID int `json:"sessionId"` // Frame number.
}

ScreencastFrameAckArgs represents the arguments for ScreencastFrameAck in the Page domain.

func NewScreencastFrameAckArgs

func NewScreencastFrameAckArgs(sessionID int) *ScreencastFrameAckArgs

NewScreencastFrameAckArgs initializes ScreencastFrameAckArgs with the required arguments.

type ScreencastFrameClient

type ScreencastFrameClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*ScreencastFrameReply, error)
	rpcc.Stream
}

ScreencastFrameClient is a client for ScreencastFrame events. Compressed image data requested by the `startScreencast`.

type ScreencastFrameMetadata

type ScreencastFrameMetadata struct {
	OffsetTop       float64                `json:"offsetTop"`           // Top offset in DIP.
	PageScaleFactor float64                `json:"pageScaleFactor"`     // Page scale factor.
	DeviceWidth     float64                `json:"deviceWidth"`         // Device screen width in DIP.
	DeviceHeight    float64                `json:"deviceHeight"`        // Device screen height in DIP.
	ScrollOffsetX   float64                `json:"scrollOffsetX"`       // Position of horizontal scroll in CSS pixels.
	ScrollOffsetY   float64                `json:"scrollOffsetY"`       // Position of vertical scroll in CSS pixels.
	Timestamp       network.TimeSinceEpoch `json:"timestamp,omitempty"` // Frame swap timestamp.
}

ScreencastFrameMetadata Screencast frame metadata.

Note: This type is experimental.

type ScreencastFrameReply

type ScreencastFrameReply struct {
	Data      []byte                  `json:"data"`      // Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)
	Metadata  ScreencastFrameMetadata `json:"metadata"`  // Screencast frame metadata.
	SessionID int                     `json:"sessionId"` // Frame number.
}

ScreencastFrameReply is the reply for ScreencastFrame events.

type ScreencastVisibilityChangedClient

type ScreencastVisibilityChangedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*ScreencastVisibilityChangedReply, error)
	rpcc.Stream
}

ScreencastVisibilityChangedClient is a client for ScreencastVisibilityChanged events. Fired when the page with currently enabled screencast was shown or hidden `.

type ScreencastVisibilityChangedReply

type ScreencastVisibilityChangedReply struct {
	Visible bool `json:"visible"` // True if the page is visible.
}

ScreencastVisibilityChangedReply is the reply for ScreencastVisibilityChanged events.

type ScriptIdentifier

type ScriptIdentifier string

ScriptIdentifier Unique script identifier.

type SearchInResourceArgs

type SearchInResourceArgs struct {
	FrameID       FrameID `json:"frameId"`                 // Frame id for resource to search in.
	URL           string  `json:"url"`                     // URL of the resource to search in.
	Query         string  `json:"query"`                   // String to search for.
	CaseSensitive *bool   `json:"caseSensitive,omitempty"` // If true, search is case sensitive.
	IsRegex       *bool   `json:"isRegex,omitempty"`       // If true, treats string parameter as regex.
}

SearchInResourceArgs represents the arguments for SearchInResource in the Page domain.

func NewSearchInResourceArgs

func NewSearchInResourceArgs(frameID FrameID, url string, query string) *SearchInResourceArgs

NewSearchInResourceArgs initializes SearchInResourceArgs with the required arguments.

func (*SearchInResourceArgs) SetCaseSensitive

func (a *SearchInResourceArgs) SetCaseSensitive(caseSensitive bool) *SearchInResourceArgs

SetCaseSensitive sets the CaseSensitive optional argument. If true, search is case sensitive.

func (*SearchInResourceArgs) SetIsRegex

func (a *SearchInResourceArgs) SetIsRegex(isRegex bool) *SearchInResourceArgs

SetIsRegex sets the IsRegex optional argument. If true, treats string parameter as regex.

type SearchInResourceReply

type SearchInResourceReply struct {
	Result []debugger.SearchMatch `json:"result"` // List of search matches.
}

SearchInResourceReply represents the return values for SearchInResource in the Page domain.

type SecureContextType added in v0.31.0

type SecureContextType string

SecureContextType Indicates whether the frame is a secure context and why it is the case.

Note: This type is experimental.

const (
	SecureContextTypeNotSet           SecureContextType = ""
	SecureContextTypeSecure           SecureContextType = "Secure"
	SecureContextTypeSecureLocalhost  SecureContextType = "SecureLocalhost"
	SecureContextTypeInsecureScheme   SecureContextType = "InsecureScheme"
	SecureContextTypeInsecureAncestor SecureContextType = "InsecureAncestor"
)

SecureContextType as enums.

func (SecureContextType) String added in v0.31.0

func (e SecureContextType) String() string

func (SecureContextType) Valid added in v0.31.0

func (e SecureContextType) Valid() bool

type SetAdBlockingEnabledArgs added in v0.9.1

type SetAdBlockingEnabledArgs struct {
	Enabled bool `json:"enabled"` // Whether to block ads.
}

SetAdBlockingEnabledArgs represents the arguments for SetAdBlockingEnabled in the Page domain.

func NewSetAdBlockingEnabledArgs added in v0.9.1

func NewSetAdBlockingEnabledArgs(enabled bool) *SetAdBlockingEnabledArgs

NewSetAdBlockingEnabledArgs initializes SetAdBlockingEnabledArgs with the required arguments.

type SetBypassCSPArgs added in v0.17.4

type SetBypassCSPArgs struct {
	Enabled bool `json:"enabled"` // Whether to bypass page CSP.
}

SetBypassCSPArgs represents the arguments for SetBypassCSP in the Page domain.

func NewSetBypassCSPArgs added in v0.17.4

func NewSetBypassCSPArgs(enabled bool) *SetBypassCSPArgs

NewSetBypassCSPArgs initializes SetBypassCSPArgs with the required arguments.

type SetDocumentContentArgs

type SetDocumentContentArgs struct {
	FrameID FrameID `json:"frameId"` // Frame id to set HTML for.
	HTML    string  `json:"html"`    // HTML content to set.
}

SetDocumentContentArgs represents the arguments for SetDocumentContent in the Page domain.

func NewSetDocumentContentArgs

func NewSetDocumentContentArgs(frameID FrameID, html string) *SetDocumentContentArgs

NewSetDocumentContentArgs initializes SetDocumentContentArgs with the required arguments.

type SetDownloadBehaviorArgs added in v0.11.4

type SetDownloadBehaviorArgs struct {
	// Behavior Whether to allow all or deny all download requests, or use
	// default Chrome behavior if available (otherwise deny).
	//
	// Values: "deny", "allow", "default".
	Behavior     string  `json:"behavior"`
	DownloadPath *string `json:"downloadPath,omitempty"` // The default path to save downloaded files to. This is required if behavior is set to 'allow'
}

SetDownloadBehaviorArgs represents the arguments for SetDownloadBehavior in the Page domain.

func NewSetDownloadBehaviorArgs added in v0.11.4

func NewSetDownloadBehaviorArgs(behavior string) *SetDownloadBehaviorArgs

NewSetDownloadBehaviorArgs initializes SetDownloadBehaviorArgs with the required arguments.

func (*SetDownloadBehaviorArgs) SetDownloadPath added in v0.11.4

func (a *SetDownloadBehaviorArgs) SetDownloadPath(downloadPath string) *SetDownloadBehaviorArgs

SetDownloadPath sets the DownloadPath optional argument. The default path to save downloaded files to. This is required if behavior is set to 'allow'

type SetFontFamiliesArgs added in v0.18.4

type SetFontFamiliesArgs struct {
	FontFamilies FontFamilies `json:"fontFamilies"` // Specifies font families to set. If a font family is not specified, it won't be changed.
}

SetFontFamiliesArgs represents the arguments for SetFontFamilies in the Page domain.

func NewSetFontFamiliesArgs added in v0.18.4

func NewSetFontFamiliesArgs(fontFamilies FontFamilies) *SetFontFamiliesArgs

NewSetFontFamiliesArgs initializes SetFontFamiliesArgs with the required arguments.

type SetFontSizesArgs added in v0.18.4

type SetFontSizesArgs struct {
	FontSizes FontSizes `json:"fontSizes"` // Specifies font sizes to set. If a font size is not specified, it won't be changed.
}

SetFontSizesArgs represents the arguments for SetFontSizes in the Page domain.

func NewSetFontSizesArgs added in v0.18.4

func NewSetFontSizesArgs(fontSizes FontSizes) *SetFontSizesArgs

NewSetFontSizesArgs initializes SetFontSizesArgs with the required arguments.

type SetInterceptFileChooserDialogArgs added in v0.24.1

type SetInterceptFileChooserDialogArgs struct {
	Enabled bool `json:"enabled"` // No description.
}

SetInterceptFileChooserDialogArgs represents the arguments for SetInterceptFileChooserDialog in the Page domain.

func NewSetInterceptFileChooserDialogArgs added in v0.24.1

func NewSetInterceptFileChooserDialogArgs(enabled bool) *SetInterceptFileChooserDialogArgs

NewSetInterceptFileChooserDialogArgs initializes SetInterceptFileChooserDialogArgs with the required arguments.

type SetLifecycleEventsEnabledArgs added in v0.14.2

type SetLifecycleEventsEnabledArgs struct {
	Enabled bool `json:"enabled"` // If true, starts emitting lifecycle events.
}

SetLifecycleEventsEnabledArgs represents the arguments for SetLifecycleEventsEnabled in the Page domain.

func NewSetLifecycleEventsEnabledArgs added in v0.14.2

func NewSetLifecycleEventsEnabledArgs(enabled bool) *SetLifecycleEventsEnabledArgs

NewSetLifecycleEventsEnabledArgs initializes SetLifecycleEventsEnabledArgs with the required arguments.

type SetProduceCompilationCacheArgs added in v0.18.6

type SetProduceCompilationCacheArgs struct {
	Enabled bool `json:"enabled"` // No description.
}

SetProduceCompilationCacheArgs represents the arguments for SetProduceCompilationCache in the Page domain.

func NewSetProduceCompilationCacheArgs added in v0.18.6

func NewSetProduceCompilationCacheArgs(enabled bool) *SetProduceCompilationCacheArgs

NewSetProduceCompilationCacheArgs initializes SetProduceCompilationCacheArgs with the required arguments.

type SetWebLifecycleStateArgs added in v0.18.1

type SetWebLifecycleStateArgs struct {
	// State Target lifecycle state
	//
	// Values: "frozen", "active".
	State string `json:"state"`
}

SetWebLifecycleStateArgs represents the arguments for SetWebLifecycleState in the Page domain.

func NewSetWebLifecycleStateArgs added in v0.18.1

func NewSetWebLifecycleStateArgs(state string) *SetWebLifecycleStateArgs

NewSetWebLifecycleStateArgs initializes SetWebLifecycleStateArgs with the required arguments.

type StartScreencastArgs

type StartScreencastArgs struct {
	// Format Image compression format.
	//
	// Values: "jpeg", "png".
	Format        *string `json:"format,omitempty"`
	Quality       *int    `json:"quality,omitempty"`       // Compression quality from range [0..100].
	MaxWidth      *int    `json:"maxWidth,omitempty"`      // Maximum screenshot width.
	MaxHeight     *int    `json:"maxHeight,omitempty"`     // Maximum screenshot height.
	EveryNthFrame *int    `json:"everyNthFrame,omitempty"` // Send every n-th frame.
}

StartScreencastArgs represents the arguments for StartScreencast in the Page domain.

func NewStartScreencastArgs

func NewStartScreencastArgs() *StartScreencastArgs

NewStartScreencastArgs initializes StartScreencastArgs with the required arguments.

func (*StartScreencastArgs) SetEveryNthFrame

func (a *StartScreencastArgs) SetEveryNthFrame(everyNthFrame int) *StartScreencastArgs

SetEveryNthFrame sets the EveryNthFrame optional argument. Send every n-th frame.

func (*StartScreencastArgs) SetFormat

func (a *StartScreencastArgs) SetFormat(format string) *StartScreencastArgs

SetFormat sets the Format optional argument. Image compression format.

Values: "jpeg", "png".

func (*StartScreencastArgs) SetMaxHeight

func (a *StartScreencastArgs) SetMaxHeight(maxHeight int) *StartScreencastArgs

SetMaxHeight sets the MaxHeight optional argument. Maximum screenshot height.

func (*StartScreencastArgs) SetMaxWidth

func (a *StartScreencastArgs) SetMaxWidth(maxWidth int) *StartScreencastArgs

SetMaxWidth sets the MaxWidth optional argument. Maximum screenshot width.

func (*StartScreencastArgs) SetQuality

func (a *StartScreencastArgs) SetQuality(quality int) *StartScreencastArgs

SetQuality sets the Quality optional argument. Compression quality from range [0..100].

type TransitionType

type TransitionType string

TransitionType Transition type.

const (
	TransitionTypeNotSet           TransitionType = ""
	TransitionTypeLink             TransitionType = "link"
	TransitionTypeTyped            TransitionType = "typed"
	TransitionTypeAddressBar       TransitionType = "address_bar"
	TransitionTypeAutoBookmark     TransitionType = "auto_bookmark"
	TransitionTypeAutoSubframe     TransitionType = "auto_subframe"
	TransitionTypeManualSubframe   TransitionType = "manual_subframe"
	TransitionTypeGenerated        TransitionType = "generated"
	TransitionTypeAutoToplevel     TransitionType = "auto_toplevel"
	TransitionTypeFormSubmit       TransitionType = "form_submit"
	TransitionTypeReload           TransitionType = "reload"
	TransitionTypeKeyword          TransitionType = "keyword"
	TransitionTypeKeywordGenerated TransitionType = "keyword_generated"
	TransitionTypeOther            TransitionType = "other"
)

TransitionType as enums.

func (TransitionType) String

func (e TransitionType) String() string

func (TransitionType) Valid

func (e TransitionType) Valid() bool

type Viewport added in v0.9.1

type Viewport struct {
	X      float64 `json:"x"`      // X offset in device independent pixels (dip).
	Y      float64 `json:"y"`      // Y offset in device independent pixels (dip).
	Width  float64 `json:"width"`  // Rectangle width in device independent pixels (dip).
	Height float64 `json:"height"` // Rectangle height in device independent pixels (dip).
	Scale  float64 `json:"scale"`  // Page scale factor.
}

Viewport Viewport for capturing screenshot.

type VisualViewport

type VisualViewport struct {
	OffsetX      float64  `json:"offsetX"`        // Horizontal offset relative to the layout viewport (CSS pixels).
	OffsetY      float64  `json:"offsetY"`        // Vertical offset relative to the layout viewport (CSS pixels).
	PageX        float64  `json:"pageX"`          // Horizontal offset relative to the document (CSS pixels).
	PageY        float64  `json:"pageY"`          // Vertical offset relative to the document (CSS pixels).
	ClientWidth  float64  `json:"clientWidth"`    // Width (CSS pixels), excludes scrollbar if present.
	ClientHeight float64  `json:"clientHeight"`   // Height (CSS pixels), excludes scrollbar if present.
	Scale        float64  `json:"scale"`          // Scale relative to the ideal viewport (size at width=device-width).
	Zoom         *float64 `json:"zoom,omitempty"` // Page zoom factor (CSS to device independent pixels ratio).
}

VisualViewport Visual viewport position, dimensions, and scale.

type WindowOpenClient added in v0.14.1

type WindowOpenClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*WindowOpenReply, error)
	rpcc.Stream
}

WindowOpenClient is a client for WindowOpen events. Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.

type WindowOpenReply added in v0.14.1

type WindowOpenReply struct {
	URL            string   `json:"url"`            // The URL for the new window.
	WindowName     string   `json:"windowName"`     // Window name.
	WindowFeatures []string `json:"windowFeatures"` // An array of enabled window features.
	UserGesture    bool     `json:"userGesture"`    // Whether or not it was triggered by user gesture.
}

WindowOpenReply is the reply for WindowOpen events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL