Documentation
¶
Overview ¶
Package page provides type definitions for use with the Chrome Page protocol
https://chromedevtools.github.io/devtools-protocol/tot/Page/
Index ¶
- Variables
- type AddScriptToEvaluateOnLoadParams
- type AddScriptToEvaluateOnLoadResult
- type AddScriptToEvaluateOnNewDocumentParams
- type AddScriptToEvaluateOnNewDocumentResult
- type AppManifestError
- type BehaviorEnum
- type BringToFrontResult
- type CaptureScreenshotParams
- type CaptureScreenshotResult
- type CreateIsolatedWorldParams
- type CreateIsolatedWorldResult
- type DOMContentEventFiredEvent
- type DialogTypeEnum
- type DisableResult
- type EnableResult
- type FormatEnum
- type Frame
- type FrameAttachedEvent
- type FrameClearedScheduledNavigationEvent
- type FrameDetachedEvent
- type FrameID
- type FrameNavigatedEvent
- type FrameResizedEvent
- type FrameResource
- type FrameResourceTree
- type FrameScheduledNavigationEvent
- type FrameStartedLoadingEvent
- type FrameStoppedLoadingEvent
- type FrameTree
- type GetAppManifestParams
- type GetAppManifestResult
- type GetFrameTreeResult
- type GetLayoutMetricsResult
- type GetNavigationHistoryResult
- type GetResourceContentParams
- type GetResourceContentResult
- type GetResourceTreeResult
- type HandleJavaScriptDialogParams
- type HandleJavaScriptDialogResult
- type InterstitialHiddenEvent
- type InterstitialShownEvent
- type JavascriptDialogClosedEvent
- type JavascriptDialogOpeningEvent
- type LayoutViewport
- type LifecycleEventEvent
- type LoadEventFiredEvent
- type LoaderID
- type MonotonicTime
- type NavigateParams
- type NavigateResult
- type NavigateToHistoryEntryParams
- type NavigateToHistoryEntryResult
- type NavigationEntry
- type PrintToPDFParams
- type PrintToPDFResult
- type ReasonEnum
- type Rect
- type ReloadParams
- type ReloadResult
- type RemoveScriptToEvaluateOnLoadParams
- type RemoveScriptToEvaluateOnLoadResult
- type RemoveScriptToEvaluateOnNewDocumentParams
- type RemoveScriptToEvaluateOnNewDocumentResult
- type RequestAppBannerResult
- type ResourceTypeEnum
- type ScreencastFrameAckParams
- type ScreencastFrameAckResult
- type ScreencastFrameEvent
- type ScreencastFrameMetadata
- type ScreencastVisibilityChangedEvent
- type ScriptIdentifier
- type SearchInResourceParams
- type SearchInResourceResult
- type SetAdBlockingEnabledParams
- type SetAdBlockingEnabledResult
- type SetAutoAttachToCreatedPagesParams
- type SetAutoAttachToCreatedPagesResult
- type SetDocumentContentParams
- type SetDocumentContentResult
- type SetDownloadBehaviorParams
- type SetDownloadBehaviorResult
- type SetLifecycleEventsEnabledParams
- type SetLifecycleEventsEnabledResult
- type StartScreencastParams
- type StartScreencastResult
- type StopLoadingResult
- type StopScreencastResult
- type TimeSinceEpoch
- type TransitionType
- type Viewport
- type VisualViewport
- type WindowOpenEvent
Constants ¶
This section is empty.
Variables ¶
var Behavior = behaviorEnum{
Deny: behaviorDeny,
Allow: behaviorAllow,
Default: behaviorDefault,
}
Behavior provides named acces to the BehaviorEnum values.
var DialogType = dialogTypeEnum{
Alert: dialogTypeAlert,
Confirm: dialogTypeConfirm,
Prompt: dialogTypePrompt,
Beforeunload: dialogTypeBeforeunload,
}
DialogType provides named acces to the DialogTypeEnum values.
var Format = formatEnum{
Png: formatPng,
Jpeg: formatJpeg,
}
Format provides named acces to the FormatEnum values.
var Reason = reasonEnum{
FormSubmissionGet: reasonFormSubmissionGet,
FormSubmissionPost: reasonFormSubmissionPost,
HTTPHeaderRefresh: reasonHTTPHeaderRefresh,
ScriptInitiated: reasonScriptInitiated,
MetaTagRefresh: reasonMetaTagRefresh,
PageBlockInterstitial: reasonPageBlockInterstitial,
Reload: reasonReload,
}
Reason provides named acces to the ReasonEnum values.
var ResourceType = resourceTypeEnum{
Document: resourceTypeDocument,
Stylesheet: resourceTypeStylesheet,
Image: resourceTypeImage,
Media: resourceTypeMedia,
Font: resourceTypeFont,
Script: resourceTypeScript,
TextTrack: resourceTypeTextTrack,
XHR: resourceTypeXHR,
Fetch: resourceTypeFetch,
EventSource: resourceTypeEventSource,
WebSocket: resourceTypeWebSocket,
Manifest: resourceTypeManifest,
Other: resourceTypeOther,
}
ResourceType provides named acces to the ResourceTypeEnum values.
Functions ¶
This section is empty.
Types ¶
type AddScriptToEvaluateOnLoadParams ¶
type AddScriptToEvaluateOnLoadParams struct {
ScriptSource string `json:"scriptSource"`
}
AddScriptToEvaluateOnLoadParams represents Page.addScriptToEvaluateOnLoad parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnLoad
type AddScriptToEvaluateOnLoadResult ¶
type AddScriptToEvaluateOnLoadResult struct { // Identifier of the added script. Identifier ScriptIdentifier `json:"identifier"` // Error information related to executing this method Err error `json:"-"` }
AddScriptToEvaluateOnLoadResult represents the result of calls to Page.addScriptToEvaluateOnLoad.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnLoad
type AddScriptToEvaluateOnNewDocumentParams ¶
type AddScriptToEvaluateOnNewDocumentParams struct {
Source string `json:"source"`
}
AddScriptToEvaluateOnNewDocumentParams represents Page.addScriptToEvaluateOnNewDocument parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnNewDocument
type AddScriptToEvaluateOnNewDocumentResult ¶
type AddScriptToEvaluateOnNewDocumentResult struct { // Identifier of the added script. Identifier ScriptIdentifier `json:"identifier"` // Error information related to executing this method Err error `json:"-"` }
AddScriptToEvaluateOnNewDocumentResult represents the result of calls to Page.addScriptToEvaluateOnNewDocument.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnNewDocument
type AppManifestError ¶
type AppManifestError struct { // Error message. Message string `json:"message"` // If criticial, this is a non-recoverable parse error. Critical int `json:"critical"` // Error line. Line int `json:"line"` // Error column. Column int `json:"column"` }
AppManifestError defines an error that occurs while parsing an app manifest.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-AppManifestError
type BehaviorEnum ¶
type BehaviorEnum int
BehaviorEnum represents whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). Allowed values:
- Behavior.Deny "deny"
- Behavior.Allow "allow"
- Behavior.Default "default"
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDownloadBehavior
func (BehaviorEnum) MarshalJSON ¶
func (enum BehaviorEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*BehaviorEnum) UnmarshalJSON ¶
func (enum *BehaviorEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type BringToFrontResult ¶
type BringToFrontResult struct { // Error information related to executing this method Err error `json:"-"` }
BringToFrontResult represents the result of calls to Page.bringToFront.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-bringToFront
type CaptureScreenshotParams ¶
type CaptureScreenshotParams struct { // Optional. Image compression format (defaults to png). Allowed values: // - Format.Jpeg // - Format.Png Format FormatEnum `json:"format,omitempty"` // Optional. Compression quality from range [0..100] (jpeg only). Quality int `json:"quality,omitempty"` // Optional. Capture the screenshot of a given region only. Clip *Viewport `json:"clip,omitempty"` // Optional. Capture the screenshot from the surface, rather than the view. // Defaults to true. EXPERIMENTAL. FromSurface bool `json:"fromSurface,omitempty"` }
CaptureScreenshotParams represents Page.captureScreenshot parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot
type CaptureScreenshotResult ¶
type CaptureScreenshotResult struct { // Base64-encoded image data. Data string `json:"data"` // Error information related to executing this method Err error `json:"-"` }
CaptureScreenshotResult represents the result of calls to Page.captureScreenshot.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot
type CreateIsolatedWorldParams ¶
type CreateIsolatedWorldParams struct { // ID of the frame in which the isolated world should be created. FrameID FrameID `json:"frameId"` // Optional. An optional name which is reported in the Execution Context. WorldName string `json:"worldName,omitempty"` // Optional. Whether or not universal access should be granted to the // isolated world. This is a powerful option, use with caution. GrantUniveralAccess bool `json:"grantUniveralAccess,omitempty"` }
CreateIsolatedWorldParams represents Page.createIsolatedWorld parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-createIsolatedWorld
type CreateIsolatedWorldResult ¶
type CreateIsolatedWorldResult struct { // Execution context of the isolated world. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Error information related to executing this method Err error `json:"-"` }
CreateIsolatedWorldResult represents the result of calls to Page.createIsolatedWorld.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-createIsolatedWorld
type DOMContentEventFiredEvent ¶
type DOMContentEventFiredEvent struct { Timestamp MonotonicTime `json:"timestamp"` // Error information related to this event Err error `json:"-"` }
DOMContentEventFiredEvent represents Page.domContentEventFired event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-domContentEventFired
type DialogTypeEnum ¶
type DialogTypeEnum int
DialogTypeEnum defines the Javascript dialog type. Allowed values:
- DialogType.Alert "alert"
- DialogType.Confirm "confirm"
- DialogType.Prompt "prompt"
- DialogType.Beforeunload "beforeunload"
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-DialogType
func (DialogTypeEnum) MarshalJSON ¶
func (enum DialogTypeEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (DialogTypeEnum) String ¶
func (enum DialogTypeEnum) String() string
String implements Stringer
func (*DialogTypeEnum) UnmarshalJSON ¶
func (enum *DialogTypeEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type DisableResult ¶
type DisableResult struct { // Error information related to executing this method Err error `json:"-"` }
DisableResult represents the result of calls to Page.disable.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-disable
type EnableResult ¶
type EnableResult struct { // Error information related to executing this method Err error `json:"-"` }
EnableResult represents the result of calls to Page.enable.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-enable
type FormatEnum ¶
type FormatEnum int
FormatEnum defines the Javascript dialog type. Allowed values:
- Format.Png "png"
- Format.Jpeg "jpeg"
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-startScreencast
func (FormatEnum) MarshalJSON ¶
func (enum FormatEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*FormatEnum) UnmarshalJSON ¶
func (enum *FormatEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type Frame ¶
type Frame struct { // Frame unique identifier. ID string `json:"id"` // Optional. Parent frame identifier. ParentID string `json:"parentId,omitempty"` // Identifier of the loader associated with this frame. LoaderID LoaderID `json:"loaderId"` // Optional. Frame's name as specified in the tag. Name string `json:"name,omitempty"` // Frame document's URL. URL string `json:"url"` // Frame document's security origin. SecurityOrigin string `json:"securityOrigin"` // Frame document's mimeType as determined by the browser. MimeType string `json:"mimeType"` // Optional. If the frame failed to load, this contains the URL that could // not be loaded. EXPERIMENTAL. UnreachableURL string `json:"unreachableUrl,omitempty"` }
Frame details information about the Frame on the page.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-Frame
type FrameAttachedEvent ¶
type FrameAttachedEvent struct { // ID of the frame that has been attached. FrameID FrameID `json:"frameId"` // Parent frame identifier. ParentFrameID FrameID `json:"parentFrameId"` // Optional. JavaScript stack trace of when frame was attached, only set if // frame initiated from script. Stack *runtime.StackTrace `json:"stack,omitempty"` // Error information related to this event Err error `json:"-"` }
FrameAttachedEvent represents Page.frameAttached event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameAttached
type FrameClearedScheduledNavigationEvent ¶
type FrameClearedScheduledNavigationEvent struct { FrameID `json:"frameId"` Err error `json:"-"` }FrameID
FrameClearedScheduledNavigationEvent represents Page.frameClearedScheduledNavigation event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameClearedScheduledNavigation
type FrameDetachedEvent ¶
type FrameDetachedEvent struct { // ID of the frame that has been detached. FrameID FrameID `json:"frameId"` // Error information related to this event Err error `json:"-"` }
FrameDetachedEvent represents Page.frameDetached event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameDetached
type FrameID ¶
type FrameID string
FrameID is a unique frame identifier
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-FrameId
type FrameNavigatedEvent ¶
FrameNavigatedEvent represents Page.frameNavigated event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameNavigated
type FrameResizedEvent ¶
type FrameResizedEvent struct { // Error information related to this event Err error `json:"-"` }
FrameResizedEvent represents Page.frameResized event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameResized
type FrameResource ¶
type FrameResource struct { // Resource URL. URL string `json:"url"` // Type of this resource. Allowed Values: // - ResourceType.Document // - ResourceType.Stylesheet // - ResourceType.Image // - ResourceType.Media // - ResourceType.Font // - ResourceType.Script // - ResourceType.TextTrack // - ResourceType.XHR // - ResourceType.Fetch // - ResourceType.EventSource // - ResourceType.WebSocket // - ResourceType.Manifest // - ResourceType.Other Type ResourceTypeEnum `json:"type"` // Resource mimeType as determined by the browser. MimeType string `json:"mimeType"` // Optional. last-modified timestamp as reported by server. LastModified TimeSinceEpoch `json:"lastModified,omitempty"` // Optional. Resource content size. ContentSize int `json:"contentSize,omitempty"` // Optional. True if the resource failed to load. Failed bool `json:"failed,omitempty"` // Optional. True if the resource was canceled during loading. Canceled bool `json:"canceled,omitempty"` }
FrameResource provides information about the Resource on the page. EXPERIMENTAL.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-FrameResource
type FrameResourceTree ¶
type FrameResourceTree struct { // Frame information for this tree item. Frame *Frame `json:"frame"` // Optional. Child frames. ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"` // Information about frame resources. Resources []*FrameResource `json:"resources"` }
FrameResourceTree provides information about the Frame hierarchy along with their cached resources. EXPERIMENTAL.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-FrameResourceTree
type FrameScheduledNavigationEvent ¶
type FrameScheduledNavigationEvent struct { FrameID `json:"frameId"` // navigation is not guaranteed to start. Delay float64 `json:"delay"` // - formSubmissionGet // - formSubmissionPost // - httpHeaderRefresh // - scriptInitiated // - metaTagRefresh // - pageBlockInterstitial // - reload Reason ReasonEnum `json:"reason"` URL string `json:"url"` Err error `json:"-"` }FrameID
FrameScheduledNavigationEvent represents Page.frameScheduledNavigation event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameScheduledNavigation
type FrameStartedLoadingEvent ¶
type FrameStartedLoadingEvent struct { // ID of the frame that has started loading. FrameID FrameID `json:"frameId"` // Error information related to this event Err error `json:"-"` }
FrameStartedLoadingEvent represents Page.frameStartedLoading event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameStartedLoading
type FrameStoppedLoadingEvent ¶
type FrameStoppedLoadingEvent struct { // ID of the frame that has stopped loading. FrameID FrameID `json:"frameId"` // Error information related to this event Err error `json:"-"` }
FrameStoppedLoadingEvent represents Page.frameStoppedLoading event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameStoppedLoading
type FrameTree ¶
type FrameTree struct { // Frame information for this tree item. Frame *Frame `json:"frame"` // Optional. Child frames. ChildFrames []*FrameTree `json:"childFrames,omitempty"` }
FrameTree provides information about the Frame hierarchy.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-FrameTree
type GetAppManifestParams ¶
type GetAppManifestParams struct { // Manifest location. URL string `json:"url"` // Errors. Errors []*AppManifestError `json:"errors"` // Optional. Manifest content. Data string `json:"data,omitempty"` }
GetAppManifestParams represents Page.getAppManifest parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getAppManifest
type GetAppManifestResult ¶
type GetAppManifestResult struct { // Error information related to executing this method Err error `json:"-"` }
GetAppManifestResult represents the result of calls to Page.getAppManifest.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getAppManifest
type GetFrameTreeResult ¶
type GetFrameTreeResult struct { // Present frame tree structure. FrameTree *FrameTree `json:"frameTree"` // Error information related to executing this method Err error `json:"-"` }
GetFrameTreeResult represents the result of calls to Page.getFrameTree.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getFrameTree
type GetLayoutMetricsResult ¶
type GetLayoutMetricsResult struct { // Metrics relating to the layout viewport. LayoutViewport *LayoutViewport `json:"layoutViewport"` // Metrics relating to the visual viewport. VisualViewport *VisualViewport `json:"visualViewport"` // Size of scrollable area. Rect is a local implementation of DOM.Rect ContentSize *Rect `json:"contentSize"` // Error information related to executing this method Err error `json:"-"` }
GetLayoutMetricsResult represents the result of calls to Page.getLayoutMetrics.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getLayoutMetrics
type GetNavigationHistoryResult ¶
type GetNavigationHistoryResult struct { int `json:"currentIndex"` Entries []*NavigationEntry `json:"entries"` Err error `json:"-"` }CurrentIndex
GetNavigationHistoryResult represents the result of calls to Page.getNavigationHistory.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getNavigationHistory
type GetResourceContentParams ¶
type GetResourceContentParams struct { // Frame ID to get resource for. FrameID FrameID `json:"frameId"` // URL of the resource to get content for. URL string `json:"url"` }
GetResourceContentParams represents Page.getResourceContent parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getResourceContent
type GetResourceContentResult ¶
type GetResourceContentResult struct { // Resource content. Content string `json:"content"` // True, if content was served as base64. Base64Encoded bool `json:"base64Encoded"` // Error information related to executing this method Err error `json:"-"` }
GetResourceContentResult represents the result of calls to Page.getResourceContent.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getResourceContent
type GetResourceTreeResult ¶
type GetResourceTreeResult struct { // Present frame / resource tree structure. FrameTree *FrameResourceTree `json:"frameTree"` // Error information related to executing this method Err error `json:"-"` }
GetResourceTreeResult represents the result of calls to Page.getResourceTree.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getResourceTree
type HandleJavaScriptDialogParams ¶
type HandleJavaScriptDialogParams struct { // Whether to accept or dismiss the dialog. Accept bool `json:"accept"` // Optional. The text to enter into the dialog prompt before accepting. Used // only if this is a prompt dialog. PromptText string `json:"promptText,omitempty"` }
HandleJavaScriptDialogParams represents Page.handleJavaScriptDialog parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-handleJavaScriptDialog
type HandleJavaScriptDialogResult ¶
type HandleJavaScriptDialogResult struct { // Error information related to executing this method Err error `json:"-"` }
HandleJavaScriptDialogResult represents the result of calls to Page.handleJavaScriptDialog.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-handleJavaScriptDialog
type InterstitialHiddenEvent ¶
type InterstitialHiddenEvent struct { // Error information related to this event Err error `json:"-"` }
InterstitialHiddenEvent represents Page.interstitialHidden event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-interstitialHidden
type InterstitialShownEvent ¶
type InterstitialShownEvent struct { // Error information related to this event Err error `json:"-"` }
InterstitialShownEvent represents Page.interstitialShown event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-interstitialShown
type JavascriptDialogClosedEvent ¶
type JavascriptDialogClosedEvent struct { // Whether dialog was confirmed. Result bool `json:"result"` // User input in case of prompt. UserInput string `json:"userInput"` // Error information related to this event Err error `json:"-"` }
JavascriptDialogClosedEvent represents Page.javascriptDialogClosed event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-javascriptDialogClosed
type JavascriptDialogOpeningEvent ¶
type JavascriptDialogOpeningEvent struct { // Frame url. URL string `json:"url"` // Message that will be displayed by the dialog. Message string `json:"message"` // Dialog type. Allowed values: // - DialogType.Alert // - DialogType.Confirm // - DialogType.Prompt // - DialogType.Beforeunload Type DialogTypeEnum `json:"type"` // Optional. Default dialog prompt. DefaultPrompt string `json:"defaultPrompt,omitempty"` // Error information related to this event Err error `json:"-"` }
JavascriptDialogOpeningEvent represents Page.javascriptDialogOpening event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-javascriptDialogOpening
type LayoutViewport ¶
type LayoutViewport struct { // Horizontal offset relative to the document (CSS pixels). PageX int `json:"pageX"` // Vertical offset relative to the document (CSS pixels). PageY int `json:"pageY"` // Width (CSS pixels), excludes scrollbar if present. ClientWidth int `json:"clientWidth"` // Height (CSS pixels), excludes scrollbar if present. ClientHeight int `json:"clientHeight"` }
LayoutViewport defines layout viewport position and dimensions.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-LayoutViewport
type LifecycleEventEvent ¶
type LifecycleEventEvent struct { // ID of the frame. FrameID FrameID `json:"frameId"` // Loader identifier. Empty string if the request is fetched from worker. LoaderID LoaderID `json:"loaderId"` // name. Name string `json:"name"` // timestamp. Timestamp MonotonicTime `json:"timestamp"` // Error information related to this event Err error `json:"-"` }
LifecycleEventEvent represents Page.lifecycleEvent event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-lifecycleEvent
type LoadEventFiredEvent ¶
type LoadEventFiredEvent struct { // timestamp. Timestamp MonotonicTime `json:"timestamp"` // Error information related to this event Err error `json:"-"` }
LoadEventFiredEvent represents Page.loadEventFired event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-loadEventFired
type LoaderID ¶
type LoaderID string
LoaderID is the Unique loader identifier. This is a duplicate of Network.LoaderID to avoid an invalid import cycle
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-LoaderId
type MonotonicTime ¶
type MonotonicTime int
MonotonicTime is the monotonically increasing time in seconds since an arbitrary point in the past. This is a duplicate of Network.MonotonicTime to avoid an invalid import cycle
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-MonotonicTime
type NavigateParams ¶
type NavigateParams struct { string `json:"url"` Referrer string `json:"referrer,omitempty"` TransitionType TransitionType `json:"transitionType,omitempty"` }URL
NavigateParams represents Page.navigate parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigate
type NavigateResult ¶
type NavigateResult struct { FrameID `json:"frameId"` LoaderID LoaderID `json:"loaderId"` ErrorText string `json:"errorText"` Err error `json:"-"` }FrameID
NavigateResult represents the result of calls to Page.navigate.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigate
type NavigateToHistoryEntryParams ¶
type NavigateToHistoryEntryParams struct { int `json:"entryId"` }EntryID
NavigateToHistoryEntryParams represents Page.navigateToHistoryEntry parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigateToHistoryEntry
type NavigateToHistoryEntryResult ¶
type NavigateToHistoryEntryResult struct { error `json:"-"` }Err
NavigateToHistoryEntryResult represents the result of calls to Page.navigateToHistoryEntry.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigateToHistoryEntry
type NavigationEntry ¶
type NavigationEntry struct { int `json:"id"` URL string `json:"url"` UserTypedURL string `json:"userTypedURL"` Title string `json:"title"` TransitionType TransitionType `json:"transitionType"` }ID
NavigationEntry defines a navigation history entry.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-NavigationEntry
type PrintToPDFParams ¶
type PrintToPDFParams struct { // Optional. Paper orientation. Defaults to false. Landscape bool `json:"landscape,omitempty"` DisplayHeaderFooter bool `json:"displayHeaderFooter,omitempty"` // Optional. Print background graphics. Defaults to false. PrintBackground bool `json:"printBackground,omitempty"` // Optional. Scale of the webpage rendering. Defaults to 1. Scale float64 `json:"scale,omitempty"` // Optional. Paper width in inches. Defaults to 8.5 inches. PaperWidth float64 `json:"paperWidth,omitempty"` // Optional. Paper height in inches. Defaults to 11 inches. PaperHeight float64 `json:"paperHeight,omitempty"` // Optional. Top margin in inches. Defaults to 1cm (~0.4 inches). MarginTop float64 `json:"marginTop,omitempty"` // Optional. Bottom margin in inches. Defaults to 1cm (~0.4 inches). MarginBottom float64 `json:"marginBottom,omitempty"` // Optional. Left margin in inches. Defaults to 1cm (~0.4 inches). MarginLeft float64 `json:"marginLeft,omitempty"` // Optional. Right margin in inches. Defaults to 1cm (~0.4 inches). MarginRight float64 `json:"marginRight,omitempty"` // Optional. Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the // empty string, which means print all pages. PageRanges string `json:"pageRanges,omitempty"` // Optional. Whether to silently ignore invalid but successfully parsed page // ranges, such as '3-2'. Defaults to false. IgnoreInvalidPageRanges bool `json:"ignoreInvalidPageRanges,omitempty"` }
PrintToPDFParams represents Page.printToPDF parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
type PrintToPDFResult ¶
type PrintToPDFResult struct { // Base64-encoded pdf data. Data string `json:"data"` // Error information related to executing this method Err error `json:"-"` }
PrintToPDFResult represents the result of calls to Page.printToPDF.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
type ReasonEnum ¶
type ReasonEnum int
ReasonEnum represents the reason for the navigation. Allowed values:
- Reason.FormSubmissionGet "formSubmissionGet"
- Reason.FormSubmissionPost "formSubmissionPost"
- Reason.HTTPHeaderRefresh "httpHeaderRefresh"
- Reason.ScriptInitiated "scriptInitiated"
- Reason.MetaTagRefresh "metaTagRefresh"
- Reason.PageBlockInterstitial "pageBlockInterstitial"
- Reason.Reload "reload"
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-frameScheduledNavigation
func (ReasonEnum) MarshalJSON ¶
func (enum ReasonEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ReasonEnum) UnmarshalJSON ¶
func (enum *ReasonEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type Rect ¶
type Rect struct { // X coordinate. X float64 `json:"x"` // Y coordinate. Y float64 `json:"y"` // Rectangle width. Width float64 `json:"width"` // Rectangle height. Height float64 `json:"height"` }
Rect defines a rectangle. This is a duplicate of DOM.Rect to avoid an invalid import cycle
https://chromedevtools.github.io/devtools-protocol/tot/DOM/#type-Rect
type ReloadParams ¶
type ReloadParams struct { // Optional. If true, browser cache is ignored (as if the user pressed // Shift+refresh). IgnoreCache bool `json:"ignoreCache,omitempty"` // Optional. If set, the script will be injected into all frames of the // inspected page after reload. ScriptToEvaluateOnLoad string `json:"scriptToEvaluateOnLoad,omitempty"` }
ReloadParams represents Page.reload parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-reload
type ReloadResult ¶
type ReloadResult struct { // Error information related to executing this method Err error `json:"-"` }
ReloadResult represents the result of calls to Page.reload.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-reload
type RemoveScriptToEvaluateOnLoadParams ¶
type RemoveScriptToEvaluateOnLoadParams struct {
Identifier ScriptIdentifier `json:"identifier"`
}
RemoveScriptToEvaluateOnLoadParams represents Page.removeScriptToEvaluateOnLoad parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-removeScriptToEvaluateOnLoad
type RemoveScriptToEvaluateOnLoadResult ¶
type RemoveScriptToEvaluateOnLoadResult struct { // Error information related to executing this method Err error `json:"-"` }
RemoveScriptToEvaluateOnLoadResult represents the result of calls to Page.removeScriptToEvaluateOnLoad.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-removeScriptToEvaluateOnLoad
type RemoveScriptToEvaluateOnNewDocumentParams ¶
type RemoveScriptToEvaluateOnNewDocumentParams struct {
Identifier ScriptIdentifier `json:"identifier"`
}
RemoveScriptToEvaluateOnNewDocumentParams represents Page.removeScriptToEvaluateOnNewDocument parameters.
type RemoveScriptToEvaluateOnNewDocumentResult ¶
type RemoveScriptToEvaluateOnNewDocumentResult struct { // Error information related to executing this method Err error `json:"-"` }
RemoveScriptToEvaluateOnNewDocumentResult represents the result of calls to Page.removeScriptToEvaluateOnNewDocument.
type RequestAppBannerResult ¶
type RequestAppBannerResult struct { // Error information related to executing this method Err error `json:"-"` }
RequestAppBannerResult represents the result of calls to Page.requestAppBanner.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-requestAppBanner
type ResourceTypeEnum ¶
type ResourceTypeEnum int
ResourceTypeEnum represents the resource type as it was perceived by the rendering engine. Allowed Values:
- ResourceType.Document "Document"
- ResourceType.Stylesheet "Stylesheet"
- ResourceType.Image "Image"
- ResourceType.Media "Media"
- ResourceType.Font "Font"
- ResourceType.Script "Script"
- ResourceType.TextTrack "TextTrack"
- ResourceType.XHR "XHR"
- ResourceType.Fetch "Fetch"
- ResourceType.EventSource "EventSource"
- ResourceType.WebSocket "WebSocket"
- ResourceType.Manifest "Manifest"
- ResourceType.Other "Other"
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-ResourceType
func (ResourceTypeEnum) MarshalJSON ¶
func (enum ResourceTypeEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (ResourceTypeEnum) String ¶
func (enum ResourceTypeEnum) String() string
String implements Stringer
func (*ResourceTypeEnum) UnmarshalJSON ¶
func (enum *ResourceTypeEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type ScreencastFrameAckParams ¶
type ScreencastFrameAckParams struct { // Frame number. SessionID int `json:"sessionId"` }
ScreencastFrameAckParams represents Page.screencastFrameAck parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-screencastFrameAck
type ScreencastFrameAckResult ¶
type ScreencastFrameAckResult struct { // Error information related to executing this method Err error `json:"-"` }
ScreencastFrameAckResult represents the result of calls to Page.screencastFrameAck.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-screencastFrameAck
type ScreencastFrameEvent ¶
type ScreencastFrameEvent struct { // Base64-encoded compressed image. Data string `json:"data"` // Screencast frame metadata. Metadata *ScreencastFrameMetadata `json:"metadata"` // Frame number. SessionID int `json:"sessionId"` // Error information related to this event Err error `json:"-"` }
ScreencastFrameEvent represents Page.screencastFrame event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-screencastFrame
type ScreencastFrameMetadata ¶
type ScreencastFrameMetadata struct { // Top offset in DIP. OffsetTop int `json:"offsetTop"` // Page scale factor. PageScaleFactor int `json:"pageScaleFactor"` // Device screen width in DIP. DeviceWidth int `json:"deviceWidth"` // Device screen height in DIP. DeviceHeight int `json:"deviceHeight"` // Position of horizontal scroll in CSS pixels. ScrollOffsetX int `json:"scrollOffsetX"` // Position of vertical scroll in CSS pixels. ScrollOffsetY int `json:"scrollOffsetY"` // Optional. Frame swap timestamp. Timestamp TimeSinceEpoch `json:"timestamp,omitempty"` }
ScreencastFrameMetadata provides screencast frame metadata. EXPERIMENTAL
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-ScreencastFrameMetadata
type ScreencastVisibilityChangedEvent ¶
type ScreencastVisibilityChangedEvent struct { // True if the page is visible. Visible bool `json:"visible"` // Error information related to this event Err error `json:"-"` }
ScreencastVisibilityChangedEvent represents Page.screencastVisibilityChanged event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-screencastVisibilityChanged
type ScriptIdentifier ¶
type ScriptIdentifier string
ScriptIdentifier is the unique script identifier.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-ScriptIdentifier
type SearchInResourceParams ¶
type SearchInResourceParams struct { // Frame ID for resource to search in. FrameID FrameID `json:"frameId"` // URL of the resource to search in. URL string `json:"url"` // String to search for. Query string `json:"query"` // Optional. If true, search is case sensitive. CaseSensitive bool `json:"caseSensitive,omitempty"` // Optional. If true, treats string parameter as regex. IsRegex bool `json:"isRegex,omitempty"` }
SearchInResourceParams represents Page.searchInResource parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-searchInResource
type SearchInResourceResult ¶
type SearchInResourceResult struct { // List of search matches. Result []*debugger.SearchMatch `json:"result"` // Error information related to executing this method Err error `json:"-"` }
SearchInResourceResult represents the result of calls to Page.searchInResource.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-searchInResource
type SetAdBlockingEnabledParams ¶
type SetAdBlockingEnabledParams struct { // Whether to block ads. Enabled bool `json:"enabled"` }
SetAdBlockingEnabledParams represents Page.setAdBlockingEnabled parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setAdBlockingEnabled
type SetAdBlockingEnabledResult ¶
type SetAdBlockingEnabledResult struct { // Error information related to executing this method Err error `json:"-"` }
SetAdBlockingEnabledResult represents the result of calls to Page.setAdBlockingEnabled.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setAdBlockingEnabled
type SetAutoAttachToCreatedPagesParams ¶
type SetAutoAttachToCreatedPagesParams struct { // If true, browser will open a new inspector window for every page created // from this one. AutoAttach bool `json:"autoAttach"` }
SetAutoAttachToCreatedPagesParams represents Page.setAutoAttachToCreatedPages parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setAutoAttachToCreatedPages
type SetAutoAttachToCreatedPagesResult ¶
type SetAutoAttachToCreatedPagesResult struct { // Error information related to executing this method Err error `json:"-"` }
SetAutoAttachToCreatedPagesResult represents the result of calls to Page.setAutoAttachToCreatedPages.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setAutoAttachToCreatedPages
type SetDocumentContentParams ¶
type SetDocumentContentParams struct { // Frame ID to set HTML for. FrameID FrameID `json:"frameId"` // HTML content to set. HTML string `json:"html"` }
SetDocumentContentParams represents Page.setDocumentContent parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDocumentContent
type SetDocumentContentResult ¶
type SetDocumentContentResult struct { // Error information related to executing this method Err error `json:"-"` }
SetDocumentContentResult represents the result of calls to Page.setDocumentContent.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDocumentContent
type SetDownloadBehaviorParams ¶
type SetDownloadBehaviorParams struct { // Whether to allow all or deny all download requests, or use default Chrome // behavior if available (otherwise deny). Allowed values: // - Behavior.Deny // - Behavior.Allow // - Behavior.Default Behavior BehaviorEnum `json:"behavior"` // Optional. The default path to save downloaded files to. This is required // if behavior is set to 'allow'. DownloadPath string `json:"downloadPath,omitempty"` }
SetDownloadBehaviorParams represents Page.setDownloadBehavior parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDownloadBehavior
type SetDownloadBehaviorResult ¶
type SetDownloadBehaviorResult struct { // Error information related to executing this method Err error `json:"-"` }
SetDownloadBehaviorResult represents the result of calls to Page.setDownloadBehavior.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDownloadBehavior
type SetLifecycleEventsEnabledParams ¶
type SetLifecycleEventsEnabledParams struct { // If true, starts emitting lifecycle events. Enabled bool `json:"enabled"` }
SetLifecycleEventsEnabledParams represents Page.setLifecycleEventsEnabled parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setLifecycleEventsEnabled
type SetLifecycleEventsEnabledResult ¶
type SetLifecycleEventsEnabledResult struct { // Error information related to executing this method Err error `json:"-"` }
SetLifecycleEventsEnabledResult represents the result of calls to Page.setLifecycleEventsEnabled.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setLifecycleEventsEnabled
type StartScreencastParams ¶
type StartScreencastParams struct { // Optional. Image compression format. Allowed values: // - Format.Jpeg // - Format.Png Format FormatEnum `json:"format,omitempty"` // Optional. Compression quality from range [0..100]. Quality int `json:"quality,omitempty"` // Optional. Maximum screenshot width. MaxWidth int `json:"maxWidth,omitempty"` // Optional. Maximum screenshot height. MaxHeight int `json:"maxHeight,omitempty"` // Optional. Send every n-th frame. EveryNthFrame int `json:"everyNthFrame,omitempty"` }
StartScreencastParams represents Page.startScreencast parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-startScreencast
type StartScreencastResult ¶
type StartScreencastResult struct { // Error information related to executing this method Err error `json:"-"` }
StartScreencastResult represents the result of calls to Page.startScreencast.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-startScreencast
type StopLoadingResult ¶
type StopLoadingResult struct { // Error information related to executing this method Err error `json:"-"` }
StopLoadingResult represents the result of calls to Page.stopLoading.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-stopLoading
type StopScreencastResult ¶
type StopScreencastResult struct { // Error information related to executing this method Err error `json:"-"` }
StopScreencastResult represents the result of calls to Page.stopScreencast.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-stopScreencast
type TimeSinceEpoch ¶
type TimeSinceEpoch int
TimeSinceEpoch represents UTC time in seconds, counted from January 1, 1970. This is a duplicate of DOM.Rect to avoid an invalid import cycle
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-TimeSinceEpoch
type TransitionType ¶
type TransitionType string
TransitionType is the transition type.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-TransitionType
type Viewport ¶
type Viewport struct { // Required. X offset in CSS pixels. X int `json:"x"` // Required. Y offset in CSS pixels. Y int `json:"y"` // Required. Rectangle width in CSS pixels Width int `json:"width"` // Required. Rectangle height in CSS pixels Height int `json:"height"` // Required. Page scale factor. Scale int `json:"scale"` }
Viewport defines the viewport for capturing screenshot.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-Viewport
type VisualViewport ¶
type VisualViewport struct { // Horizontal offset relative to the layout viewport (CSS pixels). OffsetX int `json:"offsetX"` // Vertical offset relative to the layout viewport (CSS pixels). OffsetY int `json:"offsetY"` // Horizontal offset relative to the document (CSS pixels). PageX int `json:"pageX"` // Vertical offset relative to the document (CSS pixels). PageY int `json:"pageY"` // Width (CSS pixels), excludes scrollbar if present. ClientWidth int `json:"clientWidth"` // Height (CSS pixels), excludes scrollbar if present. ClientHeight int `json:"clientHeight"` // Scale relative to the ideal viewport (size at width=device-width). Scale int `json:"scale"` }
VisualViewport defines visual viewport position, dimensions, and scale.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#type-VisualViewport
type WindowOpenEvent ¶
type WindowOpenEvent struct { // The URL for the new window. URL string `json:"url"` // Window name. WindowName string `json:"windowName"` // An array of enabled window features. WindowFeatures []string `json:"windowFeatures"` // Whether or not it was triggered by user gesture. UserGesture bool `json:"userGesture"` // Error information related to this event Err error `json:"-"` }
WindowOpenEvent represents Page.windowOpen event data.
https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-windowOpen