Documentation ¶
Overview ¶
Package page implements the Page domain. Actions and events related to the inspected page belong to the page domain.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AddScriptToEvaluateOnLoadArgs
- type AddScriptToEvaluateOnLoadReply
- type AddScriptToEvaluateOnNewDocumentArgs
- type AddScriptToEvaluateOnNewDocumentReply
- type AppManifestError
- type CaptureScreenshotArgs
- type CaptureScreenshotReply
- type CreateIsolatedWorldArgs
- type CreateIsolatedWorldReply
- type DOMContentEventFiredClient
- type DOMContentEventFiredReply
- type DeleteCookieArgs
- type DialogType
- type Frame
- type FrameAttachedClient
- type FrameAttachedReply
- type FrameClearedScheduledNavigationClient
- type FrameClearedScheduledNavigationReply
- type FrameDetachedClient
- type FrameDetachedReply
- type FrameID
- type FrameNavigatedClient
- type FrameNavigatedReply
- type FrameResizedClient
- type FrameResizedReply
- type FrameResource
- type FrameResourceTree
- type FrameScheduledNavigationClient
- type FrameScheduledNavigationReply
- type FrameStartedLoadingClient
- type FrameStartedLoadingReply
- type FrameStoppedLoadingClient
- type FrameStoppedLoadingReply
- type GetAppManifestReply
- type GetCookiesReply
- type GetLayoutMetricsReply
- type GetNavigationHistoryReply
- type GetResourceContentArgs
- type GetResourceContentReply
- type GetResourceTreeReply
- type HandleJavaScriptDialogArgs
- type InterstitialHiddenClient
- type InterstitialHiddenReply
- type InterstitialShownClient
- type InterstitialShownReply
- type JavascriptDialogClosedClient
- type JavascriptDialogClosedReply
- type JavascriptDialogOpeningClient
- type JavascriptDialogOpeningReply
- type LayoutViewport
- type LoadEventFiredClient
- type LoadEventFiredReply
- type NavigateArgs
- type NavigateReply
- type NavigateToHistoryEntryArgs
- type NavigationEntry
- type NavigationRequestedClient
- type NavigationRequestedReply
- type NavigationResponse
- type PrintToPDFArgs
- func (a *PrintToPDFArgs) SetDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetLandscape(landscape bool) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetMarginBottom(marginBottom float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetMarginLeft(marginLeft float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetMarginRight(marginRight float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetMarginTop(marginTop float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetPageRanges(pageRanges string) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetPaperHeight(paperHeight float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetPaperWidth(paperWidth float64) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetPrintBackground(printBackground bool) *PrintToPDFArgs
- func (a *PrintToPDFArgs) SetScale(scale float64) *PrintToPDFArgs
- type PrintToPDFReply
- type ProcessNavigationArgs
- type ReloadArgs
- type RemoveScriptToEvaluateOnLoadArgs
- type RemoveScriptToEvaluateOnNewDocumentArgs
- type ResourceType
- type ScreencastFrameAckArgs
- type ScreencastFrameClient
- type ScreencastFrameMetadata
- type ScreencastFrameReply
- type ScreencastVisibilityChangedClient
- type ScreencastVisibilityChangedReply
- type ScriptIdentifier
- type SearchInResourceArgs
- type SearchInResourceReply
- type SetAutoAttachToCreatedPagesArgs
- type SetControlNavigationsArgs
- type SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetOffsetX(offsetX float64) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetOffsetY(offsetY float64) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetPositionX(positionX int) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetPositionY(positionY int) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetScale(scale float64) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetScreenHeight(screenHeight int) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetScreenOrientation(screenOrientation emulation.ScreenOrientation) *SetDeviceMetricsOverrideArgs
- func (a *SetDeviceMetricsOverrideArgs) SetScreenWidth(screenWidth int) *SetDeviceMetricsOverrideArgs
- type SetDeviceOrientationOverrideArgs
- type SetDocumentContentArgs
- type SetGeolocationOverrideArgs
- type SetTouchEmulationEnabledArgs
- type StartScreencastArgs
- func (a *StartScreencastArgs) SetEveryNthFrame(everyNthFrame int) *StartScreencastArgs
- func (a *StartScreencastArgs) SetFormat(format string) *StartScreencastArgs
- func (a *StartScreencastArgs) SetMaxHeight(maxHeight int) *StartScreencastArgs
- func (a *StartScreencastArgs) SetMaxWidth(maxWidth int) *StartScreencastArgs
- func (a *StartScreencastArgs) SetQuality(quality int) *StartScreencastArgs
- type TransitionType
- type VisualViewport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddScriptToEvaluateOnLoadArgs ¶
type AddScriptToEvaluateOnLoadArgs struct {
ScriptSource string `json:"scriptSource"` //
}
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"` //
}
AddScriptToEvaluateOnNewDocumentArgs represents the arguments for AddScriptToEvaluateOnNewDocument in the Page domain.
func NewAddScriptToEvaluateOnNewDocumentArgs ¶
func NewAddScriptToEvaluateOnNewDocumentArgs(source string) *AddScriptToEvaluateOnNewDocumentArgs
NewAddScriptToEvaluateOnNewDocumentArgs initializes AddScriptToEvaluateOnNewDocumentArgs with the required arguments.
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 CaptureScreenshotArgs ¶
type CaptureScreenshotArgs struct { Format *string `json:"format,omitempty"` // Image compression format (defaults to png). Quality *int `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only). FromSurface *bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to true. }
CaptureScreenshotArgs represents the arguments for CaptureScreenshot in the Page domain.
func NewCaptureScreenshotArgs ¶
func NewCaptureScreenshotArgs() *CaptureScreenshotArgs
NewCaptureScreenshotArgs initializes CaptureScreenshotArgs with the required arguments.
func (*CaptureScreenshotArgs) SetFormat ¶
func (a *CaptureScreenshotArgs) SetFormat(format string) *CaptureScreenshotArgs
SetFormat sets the Format optional argument. Image compression format (defaults to png).
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.
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.
}
CaptureScreenshotReply represents the return values for CaptureScreenshot in the Page domain.
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 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"` //
}
DOMContentEventFiredReply is the reply for DOMContentEventFired events.
type DeleteCookieArgs ¶
type DeleteCookieArgs struct { CookieName string `json:"cookieName"` // Name of the cookie to remove. URL string `json:"url"` // URL to match cooke domain and path. }
DeleteCookieArgs represents the arguments for DeleteCookie in the Page domain.
func NewDeleteCookieArgs ¶
func NewDeleteCookieArgs(cookieName string, url string) *DeleteCookieArgs
NewDeleteCookieArgs initializes DeleteCookieArgs with the required arguments.
type DialogType ¶
type DialogType int
DialogType Javascript dialog type.
const ( DialogTypeNotSet DialogType = iota DialogTypeAlert DialogTypeConfirm DialogTypePrompt DialogTypeBeforeunload )
DialogType as enums.
func (DialogType) MarshalJSON ¶
func (e DialogType) MarshalJSON() ([]byte, error)
MarshalJSON encodes enum into a string or null when not set.
func (DialogType) String ¶
func (e DialogType) String() string
func (*DialogType) UnmarshalJSON ¶
func (e *DialogType) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes a string value into a enum.
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. SecurityOrigin string `json:"securityOrigin"` // Frame document's security origin. MimeType string `json:"mimeType"` // Frame document's mimeType as determined by the browser. }
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 { // 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 {
}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.
}
FrameDetachedReply is the reply for FrameDetached events.
type FrameID ¶
type FrameID = internal.PageFrameID
FrameID Unique frame identifier.
Provided as an alias to prevent circular dependencies.
type FrameNavigatedClient ¶
type FrameNavigatedClient interface { // 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 {
}FrameNavigatedReply is the reply for FrameNavigated 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 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.
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.
type FrameScheduledNavigationClient ¶
type FrameScheduledNavigationClient interface { // 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 {}
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 GetAppManifestReply ¶
type GetAppManifestReply struct { URL string `json:"url"` // Manifest location. Errors []AppManifestError `json:"errors"` // Data *string `json:"data,omitempty"` // Manifest content. }
GetAppManifestReply represents the return values for GetAppManifest in the Page domain.
type GetCookiesReply ¶
type GetCookiesReply struct {
Cookies []network.Cookie `json:"cookies"` // Array of cookie objects.
}
GetCookiesReply represents the return values for GetCookies in the Page domain.
type GetLayoutMetricsReply ¶
type GetLayoutMetricsReply struct { LayoutViewport LayoutViewport `json:"layoutViewport"` // Metrics relating to the layout viewport. VisualViewport VisualViewport `json:"visualViewport"` // Metrics relating to the visual viewport. ContentSize dom.Rect `json:"contentSize"` // Size of scrollable area. }
GetLayoutMetricsReply represents the return values for GetLayoutMetrics in the Page domain.
type GetNavigationHistoryReply ¶
type GetNavigationHistoryReply struct {}
GetNavigationHistoryReply represents the return values for GetNavigationHistory 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 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.
}
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 { Message string `json:"message"` // Message that will be displayed by the dialog. Type DialogType `json:"type"` // Dialog type. }
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 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"` //
}
LoadEventFiredReply is the reply for LoadEventFired events.
type NavigateArgs ¶
type NavigateArgs struct {}
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 (*NavigateArgs) SetReferrer ¶
func (a *NavigateArgs) SetReferrer(referrer string) *NavigateArgs
SetReferrer sets the Referrer optional argument. Referrer URL.
func (*NavigateArgs) SetTransitionType ¶
func (a *NavigateArgs) SetTransitionType(transitionType TransitionType) *NavigateArgs
SetTransitionType sets the TransitionType optional argument. Intended transition type.
type NavigateReply ¶
type NavigateReply struct {
}NavigateReply represents the return values for Navigate in the Page domain.
type NavigateToHistoryEntryArgs ¶
type NavigateToHistoryEntryArgs struct {
}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 NavigationRequestedClient ¶
type NavigationRequestedClient interface { // triggered, context canceled or connection closed. Recv() (*NavigationRequestedReply, error) rpcc.Stream }
NavigationRequestedClient is a client for NavigationRequested events. Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.
type NavigationRequestedReply ¶
type NavigationRequestedReply struct {}
NavigationRequestedReply is the reply for NavigationRequested events.
type NavigationResponse ¶
type NavigationResponse int
NavigationResponse Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made.
const ()
NavigationResponse as enums.
func (NavigationResponse) MarshalJSON ¶
func (e NavigationResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes enum into a string or null when not set.
func (NavigationResponse) String ¶
func (e NavigationResponse) String() string
func (*NavigationResponse) UnmarshalJSON ¶
func (e *NavigationResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes a string value into a enum.
func (NavigationResponse) Valid ¶
func (e NavigationResponse) Valid() bool
Valid returns true if enum is set.
type PrintToPDFArgs ¶
type PrintToPDFArgs struct { Landscape *bool `json:"landscape,omitempty"` // Paper orientation. 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. }
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) 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) 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.
type PrintToPDFReply ¶
type PrintToPDFReply struct {
Data []byte `json:"data"` // Base64-encoded pdf data.
}
PrintToPDFReply represents the return values for PrintToPDF in the Page domain.
type ProcessNavigationArgs ¶
type ProcessNavigationArgs struct {}
ProcessNavigationArgs represents the arguments for ProcessNavigation in the Page domain.
func NewProcessNavigationArgs ¶
func NewProcessNavigationArgs(response NavigationResponse, navigationID int) *ProcessNavigationArgs
NewProcessNavigationArgs initializes ProcessNavigationArgs with the required arguments.
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. }
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.
type RemoveScriptToEvaluateOnLoadArgs ¶
type RemoveScriptToEvaluateOnLoadArgs struct {
Identifier ScriptIdentifier `json:"identifier"` //
}
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"` //
}
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 ResourceType ¶
type ResourceType = internal.PageResourceType
ResourceType Resource type as it was perceived by the rendering engine.
Provided as an alias to prevent circular dependencies.
const ( ResourceTypeNotSet ResourceType = iota ResourceTypeDocument ResourceTypeStylesheet ResourceTypeImage ResourceTypeMedia ResourceTypeFont ResourceTypeScript ResourceTypeTextTrack ResourceTypeXHR ResourceTypeFetch ResourceTypeEventSource ResourceTypeWebSocket ResourceTypeManifest ResourceTypeOther )
ResourceType as enums.
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.
type ScreencastFrameReply ¶
type ScreencastFrameReply struct { Data []byte `json:"data"` // Base64-encoded compressed image. 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 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 SetAutoAttachToCreatedPagesArgs ¶
type SetAutoAttachToCreatedPagesArgs struct {
AutoAttach bool `json:"autoAttach"` // If true, browser will open a new inspector window for every page created from this one.
}
SetAutoAttachToCreatedPagesArgs represents the arguments for SetAutoAttachToCreatedPages in the Page domain.
func NewSetAutoAttachToCreatedPagesArgs ¶
func NewSetAutoAttachToCreatedPagesArgs(autoAttach bool) *SetAutoAttachToCreatedPagesArgs
NewSetAutoAttachToCreatedPagesArgs initializes SetAutoAttachToCreatedPagesArgs with the required arguments.
type SetControlNavigationsArgs ¶
type SetControlNavigationsArgs struct {
}SetControlNavigationsArgs represents the arguments for SetControlNavigations in the Page domain.
func NewSetControlNavigationsArgs ¶
func NewSetControlNavigationsArgs(enabled bool) *SetControlNavigationsArgs
NewSetControlNavigationsArgs initializes SetControlNavigationsArgs with the required arguments.
type SetDeviceMetricsOverrideArgs ¶
type SetDeviceMetricsOverrideArgs struct { Width int `json:"width"` // Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. Height int `json:"height"` // Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. DeviceScaleFactor float64 `json:"deviceScaleFactor"` // Overriding device scale factor value. 0 disables the override. Mobile bool `json:"mobile"` // Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. FitWindow bool `json:"fitWindow"` // Whether a view that exceeds the available browser window area should be scaled down to fit. Scale *float64 `json:"scale,omitempty"` // Scale to apply to resulting view image. Ignored in |fitWindow| mode. OffsetX *float64 `json:"offsetX,omitempty"` // X offset to shift resulting view image by. Ignored in |fitWindow| mode. OffsetY *float64 `json:"offsetY,omitempty"` // Y offset to shift resulting view image by. Ignored in |fitWindow| mode. ScreenWidth *int `json:"screenWidth,omitempty"` // Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. ScreenHeight *int `json:"screenHeight,omitempty"` // Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. PositionX *int `json:"positionX,omitempty"` // Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. PositionY *int `json:"positionY,omitempty"` // Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. ScreenOrientation *emulation.ScreenOrientation `json:"screenOrientation,omitempty"` // Screen orientation override. }
SetDeviceMetricsOverrideArgs represents the arguments for SetDeviceMetricsOverride in the Page domain.
func NewSetDeviceMetricsOverrideArgs ¶
func NewSetDeviceMetricsOverrideArgs(width int, height int, deviceScaleFactor float64, mobile bool, fitWindow bool) *SetDeviceMetricsOverrideArgs
NewSetDeviceMetricsOverrideArgs initializes SetDeviceMetricsOverrideArgs with the required arguments.
func (*SetDeviceMetricsOverrideArgs) SetOffsetX ¶
func (a *SetDeviceMetricsOverrideArgs) SetOffsetX(offsetX float64) *SetDeviceMetricsOverrideArgs
SetOffsetX sets the OffsetX optional argument. X offset to shift resulting view image by. Ignored in |fitWindow| mode.
func (*SetDeviceMetricsOverrideArgs) SetOffsetY ¶
func (a *SetDeviceMetricsOverrideArgs) SetOffsetY(offsetY float64) *SetDeviceMetricsOverrideArgs
SetOffsetY sets the OffsetY optional argument. Y offset to shift resulting view image by. Ignored in |fitWindow| mode.
func (*SetDeviceMetricsOverrideArgs) SetPositionX ¶
func (a *SetDeviceMetricsOverrideArgs) SetPositionX(positionX int) *SetDeviceMetricsOverrideArgs
SetPositionX sets the PositionX optional argument. Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
func (*SetDeviceMetricsOverrideArgs) SetPositionY ¶
func (a *SetDeviceMetricsOverrideArgs) SetPositionY(positionY int) *SetDeviceMetricsOverrideArgs
SetPositionY sets the PositionY optional argument. Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
func (*SetDeviceMetricsOverrideArgs) SetScale ¶
func (a *SetDeviceMetricsOverrideArgs) SetScale(scale float64) *SetDeviceMetricsOverrideArgs
SetScale sets the Scale optional argument. Scale to apply to resulting view image. Ignored in |fitWindow| mode.
func (*SetDeviceMetricsOverrideArgs) SetScreenHeight ¶
func (a *SetDeviceMetricsOverrideArgs) SetScreenHeight(screenHeight int) *SetDeviceMetricsOverrideArgs
SetScreenHeight sets the ScreenHeight optional argument. Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
func (*SetDeviceMetricsOverrideArgs) SetScreenOrientation ¶
func (a *SetDeviceMetricsOverrideArgs) SetScreenOrientation(screenOrientation emulation.ScreenOrientation) *SetDeviceMetricsOverrideArgs
SetScreenOrientation sets the ScreenOrientation optional argument. Screen orientation override.
func (*SetDeviceMetricsOverrideArgs) SetScreenWidth ¶
func (a *SetDeviceMetricsOverrideArgs) SetScreenWidth(screenWidth int) *SetDeviceMetricsOverrideArgs
SetScreenWidth sets the ScreenWidth optional argument. Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
type SetDeviceOrientationOverrideArgs ¶
type SetDeviceOrientationOverrideArgs struct { Alpha float64 `json:"alpha"` // Mock alpha Beta float64 `json:"beta"` // Mock beta Gamma float64 `json:"gamma"` // Mock gamma }
SetDeviceOrientationOverrideArgs represents the arguments for SetDeviceOrientationOverride in the Page domain.
func NewSetDeviceOrientationOverrideArgs ¶
func NewSetDeviceOrientationOverrideArgs(alpha float64, beta float64, gamma float64) *SetDeviceOrientationOverrideArgs
NewSetDeviceOrientationOverrideArgs initializes SetDeviceOrientationOverrideArgs 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 SetGeolocationOverrideArgs ¶
type SetGeolocationOverrideArgs struct { Latitude *float64 `json:"latitude,omitempty"` // Mock latitude Longitude *float64 `json:"longitude,omitempty"` // Mock longitude Accuracy *float64 `json:"accuracy,omitempty"` // Mock accuracy }
SetGeolocationOverrideArgs represents the arguments for SetGeolocationOverride in the Page domain.
func NewSetGeolocationOverrideArgs ¶
func NewSetGeolocationOverrideArgs() *SetGeolocationOverrideArgs
NewSetGeolocationOverrideArgs initializes SetGeolocationOverrideArgs with the required arguments.
func (*SetGeolocationOverrideArgs) SetAccuracy ¶
func (a *SetGeolocationOverrideArgs) SetAccuracy(accuracy float64) *SetGeolocationOverrideArgs
SetAccuracy sets the Accuracy optional argument. Mock accuracy
func (*SetGeolocationOverrideArgs) SetLatitude ¶
func (a *SetGeolocationOverrideArgs) SetLatitude(latitude float64) *SetGeolocationOverrideArgs
SetLatitude sets the Latitude optional argument. Mock latitude
func (*SetGeolocationOverrideArgs) SetLongitude ¶
func (a *SetGeolocationOverrideArgs) SetLongitude(longitude float64) *SetGeolocationOverrideArgs
SetLongitude sets the Longitude optional argument. Mock longitude
type SetTouchEmulationEnabledArgs ¶
type SetTouchEmulationEnabledArgs struct { Enabled bool `json:"enabled"` // Whether the touch event emulation should be enabled. Configuration *string `json:"configuration,omitempty"` // Touch/gesture events configuration. Default: current platform. }
SetTouchEmulationEnabledArgs represents the arguments for SetTouchEmulationEnabled in the Page domain.
func NewSetTouchEmulationEnabledArgs ¶
func NewSetTouchEmulationEnabledArgs(enabled bool) *SetTouchEmulationEnabledArgs
NewSetTouchEmulationEnabledArgs initializes SetTouchEmulationEnabledArgs with the required arguments.
func (*SetTouchEmulationEnabledArgs) SetConfiguration ¶
func (a *SetTouchEmulationEnabledArgs) SetConfiguration(configuration string) *SetTouchEmulationEnabledArgs
SetConfiguration sets the Configuration optional argument. Touch/gesture events configuration. Default: current platform.
type StartScreencastArgs ¶
type StartScreencastArgs struct { Format *string `json:"format,omitempty"` // Image compression format. 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.
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 int
TransitionType Transition type.
const ( TransitionTypeNotSet TransitionType = iota TransitionTypeLink TransitionTypeTyped TransitionTypeAutoBookmark TransitionTypeAutoSubframe TransitionTypeManualSubframe TransitionTypeGenerated TransitionTypeAutoToplevel TransitionTypeFormSubmit TransitionTypeReload TransitionTypeKeyword TransitionTypeKeywordGenerated TransitionTypeOther )
TransitionType as enums.
func (TransitionType) MarshalJSON ¶
func (e TransitionType) MarshalJSON() ([]byte, error)
MarshalJSON encodes enum into a string or null when not set.
func (TransitionType) String ¶
func (e TransitionType) String() string
func (*TransitionType) UnmarshalJSON ¶
func (e *TransitionType) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes a string value into a enum.
func (TransitionType) Valid ¶
func (e TransitionType) Valid() bool
Valid returns true if enum is set.
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). }
VisualViewport Visual viewport position, dimensions, and scale.