Documentation
¶
Overview ¶
Actions and events related to the inspected page belong to the page domain.
Index ¶
- type AddScriptToEvaluateOnLoadRequest
- type AddScriptToEvaluateOnLoadResult
- type AppManifestError
- type CaptureScreenshotRequest
- func (r *CaptureScreenshotRequest) Do() (*CaptureScreenshotResult, error)
- func (r *CaptureScreenshotRequest) Format(v string) *CaptureScreenshotRequest
- func (r *CaptureScreenshotRequest) FromSurface(v bool) *CaptureScreenshotRequest
- func (r *CaptureScreenshotRequest) Quality(v int) *CaptureScreenshotRequest
- type CaptureScreenshotResult
- type ClearDeviceMetricsOverrideRequest
- type ClearDeviceOrientationOverrideRequest
- type ClearGeolocationOverrideRequest
- type Client
- func (d *Client) AddScriptToEvaluateOnLoad() *AddScriptToEvaluateOnLoadRequest
- func (d *Client) CaptureScreenshot() *CaptureScreenshotRequest
- func (d *Client) ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideRequest
- func (d *Client) ClearDeviceOrientationOverride() *ClearDeviceOrientationOverrideRequest
- func (d *Client) ClearGeolocationOverride() *ClearGeolocationOverrideRequest
- func (d *Client) CreateIsolatedWorld() *CreateIsolatedWorldRequest
- func (d *Client) DeleteCookie() *DeleteCookieRequest
- func (d *Client) Disable() *DisableRequest
- func (d *Client) Enable() *EnableRequest
- func (d *Client) GetAppManifest() *GetAppManifestRequest
- func (d *Client) GetCookies() *GetCookiesRequest
- func (d *Client) GetLayoutMetrics() *GetLayoutMetricsRequest
- func (d *Client) GetNavigationHistory() *GetNavigationHistoryRequest
- func (d *Client) GetResourceContent() *GetResourceContentRequest
- func (d *Client) GetResourceTree() *GetResourceTreeRequest
- func (d *Client) HandleJavaScriptDialog() *HandleJavaScriptDialogRequest
- func (d *Client) Navigate() *NavigateRequest
- func (d *Client) NavigateToHistoryEntry() *NavigateToHistoryEntryRequest
- func (d *Client) PrintToPDF() *PrintToPDFRequest
- func (d *Client) ProcessNavigation() *ProcessNavigationRequest
- func (d *Client) Reload() *ReloadRequest
- func (d *Client) RemoveScriptToEvaluateOnLoad() *RemoveScriptToEvaluateOnLoadRequest
- func (d *Client) RequestAppBanner() *RequestAppBannerRequest
- func (d *Client) ScreencastFrameAck() *ScreencastFrameAckRequest
- func (d *Client) SearchInResource() *SearchInResourceRequest
- func (d *Client) SetAutoAttachToCreatedPages() *SetAutoAttachToCreatedPagesRequest
- func (d *Client) SetControlNavigations() *SetControlNavigationsRequest
- func (d *Client) SetDeviceMetricsOverride() *SetDeviceMetricsOverrideRequest
- func (d *Client) SetDeviceOrientationOverride() *SetDeviceOrientationOverrideRequest
- func (d *Client) SetDocumentContent() *SetDocumentContentRequest
- func (d *Client) SetGeolocationOverride() *SetGeolocationOverrideRequest
- func (d *Client) SetTouchEmulationEnabled() *SetTouchEmulationEnabledRequest
- func (d *Client) StartScreencast() *StartScreencastRequest
- func (d *Client) StopLoading() *StopLoadingRequest
- func (d *Client) StopScreencast() *StopScreencastRequest
- type CreateIsolatedWorldRequest
- func (r *CreateIsolatedWorldRequest) Do() error
- func (r *CreateIsolatedWorldRequest) FrameId(v FrameId) *CreateIsolatedWorldRequest
- func (r *CreateIsolatedWorldRequest) GrantUniveralAccess(v bool) *CreateIsolatedWorldRequest
- func (r *CreateIsolatedWorldRequest) WorldName(v string) *CreateIsolatedWorldRequest
- type DeleteCookieRequest
- type DialogType
- type DisableRequest
- type DomContentEventFiredEvent
- type EnableRequest
- 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 GetAppManifestRequest
- type GetAppManifestResult
- type GetCookiesRequest
- type GetCookiesResult
- type GetLayoutMetricsRequest
- type GetLayoutMetricsResult
- type GetNavigationHistoryRequest
- type GetNavigationHistoryResult
- type GetResourceContentRequest
- type GetResourceContentResult
- type GetResourceTreeRequest
- type GetResourceTreeResult
- type HandleJavaScriptDialogRequest
- type InterstitialHiddenEvent
- type InterstitialShownEvent
- type JavascriptDialogClosedEvent
- type JavascriptDialogOpeningEvent
- type LayoutViewport
- type LoadEventFiredEvent
- type NavigateRequest
- type NavigateResult
- type NavigateToHistoryEntryRequest
- type NavigationEntry
- type NavigationRequestedEvent
- type NavigationResponse
- type PrintToPDFRequest
- func (r *PrintToPDFRequest) DisplayHeaderFooter(v bool) *PrintToPDFRequest
- func (r *PrintToPDFRequest) Do() (*PrintToPDFResult, error)
- func (r *PrintToPDFRequest) Landscape(v bool) *PrintToPDFRequest
- func (r *PrintToPDFRequest) MarginBottom(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) MarginLeft(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) MarginRight(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) MarginTop(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) PageRanges(v string) *PrintToPDFRequest
- func (r *PrintToPDFRequest) PaperHeight(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) PaperWidth(v float64) *PrintToPDFRequest
- func (r *PrintToPDFRequest) PrintBackground(v bool) *PrintToPDFRequest
- func (r *PrintToPDFRequest) Scale(v float64) *PrintToPDFRequest
- type PrintToPDFResult
- type ProcessNavigationRequest
- type ReloadRequest
- type RemoveScriptToEvaluateOnLoadRequest
- type RequestAppBannerRequest
- type ResourceType
- type ScreencastFrameAckRequest
- type ScreencastFrameEvent
- type ScreencastFrameMetadata
- type ScreencastVisibilityChangedEvent
- type ScriptIdentifier
- type SearchInResourceRequest
- func (r *SearchInResourceRequest) CaseSensitive(v bool) *SearchInResourceRequest
- func (r *SearchInResourceRequest) Do() (*SearchInResourceResult, error)
- func (r *SearchInResourceRequest) FrameId(v FrameId) *SearchInResourceRequest
- func (r *SearchInResourceRequest) IsRegex(v bool) *SearchInResourceRequest
- func (r *SearchInResourceRequest) Query(v string) *SearchInResourceRequest
- func (r *SearchInResourceRequest) URL(v string) *SearchInResourceRequest
- type SearchInResourceResult
- type SetAutoAttachToCreatedPagesRequest
- type SetControlNavigationsRequest
- type SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) DeviceScaleFactor(v float64) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) Do() error
- func (r *SetDeviceMetricsOverrideRequest) FitWindow(v bool) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) Height(v int) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) Mobile(v bool) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) OffsetX(v float64) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) OffsetY(v float64) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) PositionX(v int) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) PositionY(v int) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) Scale(v float64) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) ScreenHeight(v int) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) ScreenOrientation(v *emulation.ScreenOrientation) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) ScreenWidth(v int) *SetDeviceMetricsOverrideRequest
- func (r *SetDeviceMetricsOverrideRequest) Width(v int) *SetDeviceMetricsOverrideRequest
- type SetDeviceOrientationOverrideRequest
- func (r *SetDeviceOrientationOverrideRequest) Alpha(v float64) *SetDeviceOrientationOverrideRequest
- func (r *SetDeviceOrientationOverrideRequest) Beta(v float64) *SetDeviceOrientationOverrideRequest
- func (r *SetDeviceOrientationOverrideRequest) Do() error
- func (r *SetDeviceOrientationOverrideRequest) Gamma(v float64) *SetDeviceOrientationOverrideRequest
- type SetDocumentContentRequest
- type SetGeolocationOverrideRequest
- func (r *SetGeolocationOverrideRequest) Accuracy(v float64) *SetGeolocationOverrideRequest
- func (r *SetGeolocationOverrideRequest) Do() error
- func (r *SetGeolocationOverrideRequest) Latitude(v float64) *SetGeolocationOverrideRequest
- func (r *SetGeolocationOverrideRequest) Longitude(v float64) *SetGeolocationOverrideRequest
- type SetTouchEmulationEnabledRequest
- type StartScreencastRequest
- func (r *StartScreencastRequest) Do() error
- func (r *StartScreencastRequest) EveryNthFrame(v int) *StartScreencastRequest
- func (r *StartScreencastRequest) Format(v string) *StartScreencastRequest
- func (r *StartScreencastRequest) MaxHeight(v int) *StartScreencastRequest
- func (r *StartScreencastRequest) MaxWidth(v int) *StartScreencastRequest
- func (r *StartScreencastRequest) Quality(v int) *StartScreencastRequest
- type StopLoadingRequest
- type StopScreencastRequest
- type TransitionType
- type VisualViewport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddScriptToEvaluateOnLoadRequest ¶
type AddScriptToEvaluateOnLoadRequest struct {
// contains filtered or unexported fields
}
func (*AddScriptToEvaluateOnLoadRequest) Do ¶
func (r *AddScriptToEvaluateOnLoadRequest) Do() (*AddScriptToEvaluateOnLoadResult, error)
func (*AddScriptToEvaluateOnLoadRequest) ScriptSource ¶
func (r *AddScriptToEvaluateOnLoadRequest) ScriptSource(v string) *AddScriptToEvaluateOnLoadRequest
type AddScriptToEvaluateOnLoadResult ¶
type AddScriptToEvaluateOnLoadResult struct { // Identifier of the added script. Identifier ScriptIdentifier `json:"identifier"` }
type AppManifestError ¶
type CaptureScreenshotRequest ¶
type CaptureScreenshotRequest struct {
// contains filtered or unexported fields
}
func (*CaptureScreenshotRequest) Do ¶
func (r *CaptureScreenshotRequest) Do() (*CaptureScreenshotResult, error)
func (*CaptureScreenshotRequest) Format ¶
func (r *CaptureScreenshotRequest) Format(v string) *CaptureScreenshotRequest
Image compression format (defaults to png). (optional)
func (*CaptureScreenshotRequest) FromSurface ¶
func (r *CaptureScreenshotRequest) FromSurface(v bool) *CaptureScreenshotRequest
Capture the screenshot from the surface, rather than the view. Defaults to true. (optional, experimental)
func (*CaptureScreenshotRequest) Quality ¶
func (r *CaptureScreenshotRequest) Quality(v int) *CaptureScreenshotRequest
Compression quality from range [0..100] (jpeg only). (optional)
type CaptureScreenshotResult ¶
type CaptureScreenshotResult struct { // Base64-encoded image data. Data string `json:"data"` }
type ClearDeviceMetricsOverrideRequest ¶
type ClearDeviceMetricsOverrideRequest struct {
// contains filtered or unexported fields
}
func (*ClearDeviceMetricsOverrideRequest) Do ¶
func (r *ClearDeviceMetricsOverrideRequest) Do() error
type ClearDeviceOrientationOverrideRequest ¶
type ClearDeviceOrientationOverrideRequest struct {
// contains filtered or unexported fields
}
func (*ClearDeviceOrientationOverrideRequest) Do ¶
func (r *ClearDeviceOrientationOverrideRequest) Do() error
type ClearGeolocationOverrideRequest ¶
type ClearGeolocationOverrideRequest struct {
// contains filtered or unexported fields
}
func (*ClearGeolocationOverrideRequest) Do ¶
func (r *ClearGeolocationOverrideRequest) Do() error
type Client ¶
Actions and events related to the inspected page belong to the page domain.
func (*Client) AddScriptToEvaluateOnLoad ¶
func (d *Client) AddScriptToEvaluateOnLoad() *AddScriptToEvaluateOnLoadRequest
(experimental)
func (*Client) CaptureScreenshot ¶
func (d *Client) CaptureScreenshot() *CaptureScreenshotRequest
Capture page screenshot. (experimental)
func (*Client) ClearDeviceMetricsOverride ¶
func (d *Client) ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideRequest
Clears the overriden device metrics. (experimental)
func (*Client) ClearDeviceOrientationOverride ¶
func (d *Client) ClearDeviceOrientationOverride() *ClearDeviceOrientationOverrideRequest
Clears the overridden Device Orientation. (experimental)
func (*Client) ClearGeolocationOverride ¶
func (d *Client) ClearGeolocationOverride() *ClearGeolocationOverrideRequest
Clears the overriden Geolocation Position and Error.
func (*Client) CreateIsolatedWorld ¶
func (d *Client) CreateIsolatedWorld() *CreateIsolatedWorldRequest
Creates an isolated world for the given frame. (experimental)
func (*Client) DeleteCookie ¶
func (d *Client) DeleteCookie() *DeleteCookieRequest
Deletes browser cookie with given name, domain and path. (experimental)
func (*Client) Disable ¶
func (d *Client) Disable() *DisableRequest
Disables page domain notifications.
func (*Client) GetAppManifest ¶
func (d *Client) GetAppManifest() *GetAppManifestRequest
(experimental)
func (*Client) GetCookies ¶
func (d *Client) GetCookies() *GetCookiesRequest
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. (experimental)
func (*Client) GetLayoutMetrics ¶
func (d *Client) GetLayoutMetrics() *GetLayoutMetricsRequest
Returns metrics relating to the layouting of the page, such as viewport bounds/scale. (experimental)
func (*Client) GetNavigationHistory ¶
func (d *Client) GetNavigationHistory() *GetNavigationHistoryRequest
Returns navigation history for the current page. (experimental)
func (*Client) GetResourceContent ¶
func (d *Client) GetResourceContent() *GetResourceContentRequest
Returns content of the given resource. (experimental)
func (*Client) GetResourceTree ¶
func (d *Client) GetResourceTree() *GetResourceTreeRequest
Returns present frame / resource tree structure. (experimental)
func (*Client) HandleJavaScriptDialog ¶
func (d *Client) HandleJavaScriptDialog() *HandleJavaScriptDialogRequest
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
func (*Client) Navigate ¶
func (d *Client) Navigate() *NavigateRequest
Navigates current page to the given URL.
func (*Client) NavigateToHistoryEntry ¶
func (d *Client) NavigateToHistoryEntry() *NavigateToHistoryEntryRequest
Navigates current page to the given history entry. (experimental)
func (*Client) PrintToPDF ¶
func (d *Client) PrintToPDF() *PrintToPDFRequest
Print page as PDF. (experimental)
func (*Client) ProcessNavigation ¶
func (d *Client) ProcessNavigation() *ProcessNavigationRequest
Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation. (experimental)
func (*Client) Reload ¶
func (d *Client) Reload() *ReloadRequest
Reloads given page optionally ignoring the cache.
func (*Client) RemoveScriptToEvaluateOnLoad ¶
func (d *Client) RemoveScriptToEvaluateOnLoad() *RemoveScriptToEvaluateOnLoadRequest
(experimental)
func (*Client) RequestAppBanner ¶
func (d *Client) RequestAppBanner() *RequestAppBannerRequest
(experimental)
func (*Client) ScreencastFrameAck ¶
func (d *Client) ScreencastFrameAck() *ScreencastFrameAckRequest
Acknowledges that a screencast frame has been received by the frontend. (experimental)
func (*Client) SearchInResource ¶
func (d *Client) SearchInResource() *SearchInResourceRequest
Searches for given string in resource content. (experimental)
func (*Client) SetAutoAttachToCreatedPages ¶
func (d *Client) SetAutoAttachToCreatedPages() *SetAutoAttachToCreatedPagesRequest
Controls whether browser will open a new inspector window for connected pages. (experimental)
func (*Client) SetControlNavigations ¶
func (d *Client) SetControlNavigations() *SetControlNavigationsRequest
Toggles navigation throttling which allows programatic control over navigation and redirect response. (experimental)
func (*Client) SetDeviceMetricsOverride ¶
func (d *Client) SetDeviceMetricsOverride() *SetDeviceMetricsOverrideRequest
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). (experimental)
func (*Client) SetDeviceOrientationOverride ¶
func (d *Client) SetDeviceOrientationOverride() *SetDeviceOrientationOverrideRequest
Overrides the Device Orientation. (experimental)
func (*Client) SetDocumentContent ¶
func (d *Client) SetDocumentContent() *SetDocumentContentRequest
Sets given markup as the document's HTML. (experimental)
func (*Client) SetGeolocationOverride ¶
func (d *Client) SetGeolocationOverride() *SetGeolocationOverrideRequest
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
func (*Client) SetTouchEmulationEnabled ¶
func (d *Client) SetTouchEmulationEnabled() *SetTouchEmulationEnabledRequest
Toggles mouse event-based touch event emulation. (experimental)
func (*Client) StartScreencast ¶
func (d *Client) StartScreencast() *StartScreencastRequest
Starts sending each frame using the <code>screencastFrame</code> event. (experimental)
func (*Client) StopLoading ¶
func (d *Client) StopLoading() *StopLoadingRequest
Force the page stop all navigations and pending resource fetches. (experimental)
func (*Client) StopScreencast ¶
func (d *Client) StopScreencast() *StopScreencastRequest
Stops sending each frame in the <code>screencastFrame</code>. (experimental)
type CreateIsolatedWorldRequest ¶
type CreateIsolatedWorldRequest struct {
// contains filtered or unexported fields
}
func (*CreateIsolatedWorldRequest) Do ¶
func (r *CreateIsolatedWorldRequest) Do() error
func (*CreateIsolatedWorldRequest) FrameId ¶
func (r *CreateIsolatedWorldRequest) FrameId(v FrameId) *CreateIsolatedWorldRequest
Id of the frame in which the isolated world should be created.
func (*CreateIsolatedWorldRequest) GrantUniveralAccess ¶
func (r *CreateIsolatedWorldRequest) GrantUniveralAccess(v bool) *CreateIsolatedWorldRequest
Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. (optional)
func (*CreateIsolatedWorldRequest) WorldName ¶
func (r *CreateIsolatedWorldRequest) WorldName(v string) *CreateIsolatedWorldRequest
An optional name which is reported in the Execution Context. (optional)
type DeleteCookieRequest ¶
type DeleteCookieRequest struct {
// contains filtered or unexported fields
}
func (*DeleteCookieRequest) CookieName ¶
func (r *DeleteCookieRequest) CookieName(v string) *DeleteCookieRequest
Name of the cookie to remove.
func (*DeleteCookieRequest) Do ¶
func (r *DeleteCookieRequest) Do() error
func (*DeleteCookieRequest) URL ¶
func (r *DeleteCookieRequest) URL(v string) *DeleteCookieRequest
URL to match cooke domain and path.
type DialogType ¶
type DialogType string
type DisableRequest ¶
type DisableRequest struct {
// contains filtered or unexported fields
}
func (*DisableRequest) Do ¶
func (r *DisableRequest) Do() error
type DomContentEventFiredEvent ¶
type DomContentEventFiredEvent struct {
Timestamp float64 `json:"timestamp"`
}
type EnableRequest ¶
type EnableRequest struct {
// contains filtered or unexported fields
}
func (*EnableRequest) Do ¶
func (r *EnableRequest) Do() error
type Frame ¶
type Frame struct { // Frame unique identifier. Id string `json:"id"` // Parent frame identifier. (optional) ParentId string `json:"parentId,omitempty"` // Identifier of the loader associated with this frame. LoaderId network.LoaderId `json:"loaderId"` // Frame's name as specified in the tag. (optional) 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"` }
type FrameAttachedEvent ¶
type FrameAttachedEvent struct { // Id of the frame that has been attached. FrameId FrameId `json:"frameId"` // Parent frame identifier. ParentFrameId FrameId `json:"parentFrameId"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script. (optional, experimental) Stack *runtime.StackTrace `json:"stack"` }
Fired when frame has been attached to its parent.
type FrameClearedScheduledNavigationEvent ¶
type FrameClearedScheduledNavigationEvent struct { FrameId `json:"frameId"` }FrameId
Fired when frame no longer has a scheduled navigation. (experimental)
type FrameDetachedEvent ¶
type FrameDetachedEvent struct { // Id of the frame that has been detached. FrameId FrameId `json:"frameId"` }
Fired when frame has been detached from its parent.
type FrameNavigatedEvent ¶
type FrameNavigatedEvent struct { Frame `json:"frame"` }Frame *
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
type FrameResource ¶
type FrameResource struct { // Resource URL. URL string `json:"url"` // Type of this resource. Type ResourceType `json:"type"` // Resource mimeType as determined by the browser. MimeType string `json:"mimeType"` // last-modified timestamp as reported by server. (optional) LastModified network.Timestamp `json:"lastModified,omitempty"` // Resource content size. (optional) ContentSize float64 `json:"contentSize,omitempty"` // True if the resource failed to load. (optional) Failed bool `json:"failed,omitempty"` // True if the resource was canceled during loading. (optional) Canceled bool `json:"canceled,omitempty"` }
type FrameResourceTree ¶
type FrameResourceTree struct { // Frame information for this tree item. Frame *Frame `json:"frame"` // Child frames. (optional) ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"` // Information about frame resources. Resources []*FrameResource `json:"resources"` }
type FrameScheduledNavigationEvent ¶
type FrameScheduledNavigationEvent struct { FrameId `json:"frameId"` Delay float64 `json:"delay"` }FrameId
Fired when frame schedules a potential navigation. (experimental)
type FrameStartedLoadingEvent ¶
type FrameStartedLoadingEvent struct { // Id of the frame that has started loading. FrameId FrameId `json:"frameId"` }
Fired when frame has started loading. (experimental)
type FrameStoppedLoadingEvent ¶
type FrameStoppedLoadingEvent struct { // Id of the frame that has stopped loading. FrameId FrameId `json:"frameId"` }
Fired when frame has stopped loading. (experimental)
type GetAppManifestRequest ¶
type GetAppManifestRequest struct {
// contains filtered or unexported fields
}
func (*GetAppManifestRequest) Do ¶
func (r *GetAppManifestRequest) Do() (*GetAppManifestResult, error)
type GetAppManifestResult ¶
type GetAppManifestResult struct { // Manifest location. URL string `json:"url"` Errors []*AppManifestError `json:"errors"` // Manifest content. (optional) Data string `json:"data"` }
type GetCookiesRequest ¶
type GetCookiesRequest struct {
// contains filtered or unexported fields
}
func (*GetCookiesRequest) Do ¶
func (r *GetCookiesRequest) Do() (*GetCookiesResult, error)
type GetCookiesResult ¶
type GetLayoutMetricsRequest ¶
type GetLayoutMetricsRequest struct {
// contains filtered or unexported fields
}
func (*GetLayoutMetricsRequest) Do ¶
func (r *GetLayoutMetricsRequest) Do() (*GetLayoutMetricsResult, error)
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. ContentSize *dom.Rect `json:"contentSize"` }
type GetNavigationHistoryRequest ¶
type GetNavigationHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetNavigationHistoryRequest) Do ¶
func (r *GetNavigationHistoryRequest) Do() (*GetNavigationHistoryResult, error)
type GetNavigationHistoryResult ¶
type GetNavigationHistoryResult struct { int `json:"currentIndex"` Entries []*NavigationEntry `json:"entries"` }CurrentIndex
type GetResourceContentRequest ¶
type GetResourceContentRequest struct {
// contains filtered or unexported fields
}
func (*GetResourceContentRequest) Do ¶
func (r *GetResourceContentRequest) Do() (*GetResourceContentResult, error)
func (*GetResourceContentRequest) FrameId ¶
func (r *GetResourceContentRequest) FrameId(v FrameId) *GetResourceContentRequest
Frame id to get resource for.
func (*GetResourceContentRequest) URL ¶
func (r *GetResourceContentRequest) URL(v string) *GetResourceContentRequest
URL of the resource to get content for.
type GetResourceTreeRequest ¶
type GetResourceTreeRequest struct {
// contains filtered or unexported fields
}
func (*GetResourceTreeRequest) Do ¶
func (r *GetResourceTreeRequest) Do() (*GetResourceTreeResult, error)
type GetResourceTreeResult ¶
type GetResourceTreeResult struct { // Present frame / resource tree structure. FrameTree *FrameResourceTree `json:"frameTree"` }
type HandleJavaScriptDialogRequest ¶
type HandleJavaScriptDialogRequest struct {
// contains filtered or unexported fields
}
func (*HandleJavaScriptDialogRequest) Accept ¶
func (r *HandleJavaScriptDialogRequest) Accept(v bool) *HandleJavaScriptDialogRequest
Whether to accept or dismiss the dialog.
func (*HandleJavaScriptDialogRequest) Do ¶
func (r *HandleJavaScriptDialogRequest) Do() error
func (*HandleJavaScriptDialogRequest) PromptText ¶
func (r *HandleJavaScriptDialogRequest) PromptText(v string) *HandleJavaScriptDialogRequest
The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. (optional)
type InterstitialHiddenEvent ¶
type InterstitialHiddenEvent struct { }
Fired when interstitial page was hidden
type InterstitialShownEvent ¶
type InterstitialShownEvent struct { }
Fired when interstitial page was shown
type JavascriptDialogClosedEvent ¶
type JavascriptDialogClosedEvent struct { // Whether dialog was confirmed. Result bool `json:"result"` }
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
type JavascriptDialogOpeningEvent ¶
type JavascriptDialogOpeningEvent struct { // Message that will be displayed by the dialog. Message string `json:"message"` // Dialog type. Type DialogType `json:"type"` }
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
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"` }
type LoadEventFiredEvent ¶
type LoadEventFiredEvent struct {
Timestamp float64 `json:"timestamp"`
}
type NavigateRequest ¶
type NavigateRequest struct {
// contains filtered or unexported fields
}
func (*NavigateRequest) Do ¶
func (r *NavigateRequest) Do() (*NavigateResult, error)
func (*NavigateRequest) Referrer ¶
func (r *NavigateRequest) Referrer(v string) *NavigateRequest
Referrer URL. (optional, experimental)
func (*NavigateRequest) TransitionType ¶
func (r *NavigateRequest) TransitionType(v TransitionType) *NavigateRequest
Intended transition type. (optional, experimental)
func (*NavigateRequest) URL ¶
func (r *NavigateRequest) URL(v string) *NavigateRequest
URL to navigate the page to.
type NavigateResult ¶
type NavigateResult struct { FrameId `json:"frameId"` }FrameId
type NavigateToHistoryEntryRequest ¶
type NavigateToHistoryEntryRequest struct {
// contains filtered or unexported fields
}
func (*NavigateToHistoryEntryRequest) Do ¶
func (r *NavigateToHistoryEntryRequest) Do() error
func (*NavigateToHistoryEntryRequest) EntryId ¶
func (r *NavigateToHistoryEntryRequest) EntryId(v int) *NavigateToHistoryEntryRequest
Unique id of the entry to navigate to.
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
type NavigationRequestedEvent ¶
type NavigationRequestedEvent struct { bool `json:"isInMainFrame"` IsRedirect bool `json:"isRedirect"` URL string `json:"url"` }IsInMainFrame
Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.
type NavigationResponse ¶
type NavigationResponse string
type PrintToPDFRequest ¶
type PrintToPDFRequest struct {
// contains filtered or unexported fields
}
func (*PrintToPDFRequest) DisplayHeaderFooter ¶
func (r *PrintToPDFRequest) DisplayHeaderFooter(v bool) *PrintToPDFRequest
Display header and footer. Defaults to false. (optional)
func (*PrintToPDFRequest) Do ¶
func (r *PrintToPDFRequest) Do() (*PrintToPDFResult, error)
func (*PrintToPDFRequest) Landscape ¶
func (r *PrintToPDFRequest) Landscape(v bool) *PrintToPDFRequest
Paper orientation. Defaults to false. (optional)
func (*PrintToPDFRequest) MarginBottom ¶
func (r *PrintToPDFRequest) MarginBottom(v float64) *PrintToPDFRequest
Bottom margin in inches. Defaults to 1cm (~0.4 inches). (optional)
func (*PrintToPDFRequest) MarginLeft ¶
func (r *PrintToPDFRequest) MarginLeft(v float64) *PrintToPDFRequest
Left margin in inches. Defaults to 1cm (~0.4 inches). (optional)
func (*PrintToPDFRequest) MarginRight ¶
func (r *PrintToPDFRequest) MarginRight(v float64) *PrintToPDFRequest
Right margin in inches. Defaults to 1cm (~0.4 inches). (optional)
func (*PrintToPDFRequest) MarginTop ¶
func (r *PrintToPDFRequest) MarginTop(v float64) *PrintToPDFRequest
Top margin in inches. Defaults to 1cm (~0.4 inches). (optional)
func (*PrintToPDFRequest) PageRanges ¶
func (r *PrintToPDFRequest) PageRanges(v string) *PrintToPDFRequest
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. (optional)
func (*PrintToPDFRequest) PaperHeight ¶
func (r *PrintToPDFRequest) PaperHeight(v float64) *PrintToPDFRequest
Paper height in inches. Defaults to 11 inches. (optional)
func (*PrintToPDFRequest) PaperWidth ¶
func (r *PrintToPDFRequest) PaperWidth(v float64) *PrintToPDFRequest
Paper width in inches. Defaults to 8.5 inches. (optional)
func (*PrintToPDFRequest) PrintBackground ¶
func (r *PrintToPDFRequest) PrintBackground(v bool) *PrintToPDFRequest
Print background graphics. Defaults to false. (optional)
func (*PrintToPDFRequest) Scale ¶
func (r *PrintToPDFRequest) Scale(v float64) *PrintToPDFRequest
Scale of the webpage rendering. Defaults to 1. (optional)
type PrintToPDFResult ¶
type PrintToPDFResult struct { // Base64-encoded pdf data. Data string `json:"data"` }
type ProcessNavigationRequest ¶
type ProcessNavigationRequest struct {
// contains filtered or unexported fields
}
func (*ProcessNavigationRequest) Do ¶
func (r *ProcessNavigationRequest) Do() error
func (*ProcessNavigationRequest) NavigationId ¶
func (r *ProcessNavigationRequest) NavigationId(v int) *ProcessNavigationRequest
func (*ProcessNavigationRequest) Response ¶
func (r *ProcessNavigationRequest) Response(v NavigationResponse) *ProcessNavigationRequest
type ReloadRequest ¶
type ReloadRequest struct {
// contains filtered or unexported fields
}
func (*ReloadRequest) Do ¶
func (r *ReloadRequest) Do() error
func (*ReloadRequest) IgnoreCache ¶
func (r *ReloadRequest) IgnoreCache(v bool) *ReloadRequest
If true, browser cache is ignored (as if the user pressed Shift+refresh). (optional)
func (*ReloadRequest) ScriptToEvaluateOnLoad ¶
func (r *ReloadRequest) ScriptToEvaluateOnLoad(v string) *ReloadRequest
If set, the script will be injected into all frames of the inspected page after reload. (optional)
type RemoveScriptToEvaluateOnLoadRequest ¶
type RemoveScriptToEvaluateOnLoadRequest struct {
// contains filtered or unexported fields
}
func (*RemoveScriptToEvaluateOnLoadRequest) Do ¶
func (r *RemoveScriptToEvaluateOnLoadRequest) Do() error
func (*RemoveScriptToEvaluateOnLoadRequest) Identifier ¶
func (r *RemoveScriptToEvaluateOnLoadRequest) Identifier(v ScriptIdentifier) *RemoveScriptToEvaluateOnLoadRequest
type RequestAppBannerRequest ¶
type RequestAppBannerRequest struct {
// contains filtered or unexported fields
}
func (*RequestAppBannerRequest) Do ¶
func (r *RequestAppBannerRequest) Do() error
type ResourceType ¶
type ResourceType string
type ScreencastFrameAckRequest ¶
type ScreencastFrameAckRequest struct {
// contains filtered or unexported fields
}
func (*ScreencastFrameAckRequest) Do ¶
func (r *ScreencastFrameAckRequest) Do() error
func (*ScreencastFrameAckRequest) SessionId ¶
func (r *ScreencastFrameAckRequest) SessionId(v int) *ScreencastFrameAckRequest
Frame number.
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"` }
Compressed image data requested by the <code>startScreencast</code>. (experimental)
type ScreencastFrameMetadata ¶
type ScreencastFrameMetadata struct { // Top offset in DIP. OffsetTop float64 `json:"offsetTop"` // Page scale factor. PageScaleFactor float64 `json:"pageScaleFactor"` // Device screen width in DIP. DeviceWidth float64 `json:"deviceWidth"` // Device screen height in DIP. DeviceHeight float64 `json:"deviceHeight"` // Position of horizontal scroll in CSS pixels. ScrollOffsetX float64 `json:"scrollOffsetX"` // Position of vertical scroll in CSS pixels. ScrollOffsetY float64 `json:"scrollOffsetY"` // Frame swap timestamp. (optional, experimental) Timestamp float64 `json:"timestamp,omitempty"` }
type ScreencastVisibilityChangedEvent ¶
type ScreencastVisibilityChangedEvent struct { // True if the page is visible. Visible bool `json:"visible"` }
Fired when the page with currently enabled screencast was shown or hidden </code>. (experimental)
type ScriptIdentifier ¶
type ScriptIdentifier string
type SearchInResourceRequest ¶
type SearchInResourceRequest struct {
// contains filtered or unexported fields
}
func (*SearchInResourceRequest) CaseSensitive ¶
func (r *SearchInResourceRequest) CaseSensitive(v bool) *SearchInResourceRequest
If true, search is case sensitive. (optional)
func (*SearchInResourceRequest) Do ¶
func (r *SearchInResourceRequest) Do() (*SearchInResourceResult, error)
func (*SearchInResourceRequest) FrameId ¶
func (r *SearchInResourceRequest) FrameId(v FrameId) *SearchInResourceRequest
Frame id for resource to search in.
func (*SearchInResourceRequest) IsRegex ¶
func (r *SearchInResourceRequest) IsRegex(v bool) *SearchInResourceRequest
If true, treats string parameter as regex. (optional)
func (*SearchInResourceRequest) Query ¶
func (r *SearchInResourceRequest) Query(v string) *SearchInResourceRequest
String to search for.
func (*SearchInResourceRequest) URL ¶
func (r *SearchInResourceRequest) URL(v string) *SearchInResourceRequest
URL of the resource to search in.
type SearchInResourceResult ¶
type SearchInResourceResult struct { // List of search matches. Result []*debugger.SearchMatch `json:"result"` }
type SetAutoAttachToCreatedPagesRequest ¶
type SetAutoAttachToCreatedPagesRequest struct {
// contains filtered or unexported fields
}
func (*SetAutoAttachToCreatedPagesRequest) AutoAttach ¶
func (r *SetAutoAttachToCreatedPagesRequest) AutoAttach(v bool) *SetAutoAttachToCreatedPagesRequest
If true, browser will open a new inspector window for every page created from this one.
func (*SetAutoAttachToCreatedPagesRequest) Do ¶
func (r *SetAutoAttachToCreatedPagesRequest) Do() error
type SetControlNavigationsRequest ¶
type SetControlNavigationsRequest struct {
// contains filtered or unexported fields
}
func (*SetControlNavigationsRequest) Do ¶
func (r *SetControlNavigationsRequest) Do() error
func (*SetControlNavigationsRequest) Enabled ¶
func (r *SetControlNavigationsRequest) Enabled(v bool) *SetControlNavigationsRequest
type SetDeviceMetricsOverrideRequest ¶
type SetDeviceMetricsOverrideRequest struct {
// contains filtered or unexported fields
}
func (*SetDeviceMetricsOverrideRequest) DeviceScaleFactor ¶
func (r *SetDeviceMetricsOverrideRequest) DeviceScaleFactor(v float64) *SetDeviceMetricsOverrideRequest
Overriding device scale factor value. 0 disables the override.
func (*SetDeviceMetricsOverrideRequest) Do ¶
func (r *SetDeviceMetricsOverrideRequest) Do() error
func (*SetDeviceMetricsOverrideRequest) FitWindow ¶
func (r *SetDeviceMetricsOverrideRequest) FitWindow(v bool) *SetDeviceMetricsOverrideRequest
Whether a view that exceeds the available browser window area should be scaled down to fit.
func (*SetDeviceMetricsOverrideRequest) Height ¶
func (r *SetDeviceMetricsOverrideRequest) Height(v int) *SetDeviceMetricsOverrideRequest
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
func (*SetDeviceMetricsOverrideRequest) Mobile ¶
func (r *SetDeviceMetricsOverrideRequest) Mobile(v bool) *SetDeviceMetricsOverrideRequest
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
func (*SetDeviceMetricsOverrideRequest) OffsetX ¶
func (r *SetDeviceMetricsOverrideRequest) OffsetX(v float64) *SetDeviceMetricsOverrideRequest
X offset to shift resulting view image by. Ignored in |fitWindow| mode. (optional)
func (*SetDeviceMetricsOverrideRequest) OffsetY ¶
func (r *SetDeviceMetricsOverrideRequest) OffsetY(v float64) *SetDeviceMetricsOverrideRequest
Y offset to shift resulting view image by. Ignored in |fitWindow| mode. (optional)
func (*SetDeviceMetricsOverrideRequest) PositionX ¶
func (r *SetDeviceMetricsOverrideRequest) PositionX(v int) *SetDeviceMetricsOverrideRequest
Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)
func (*SetDeviceMetricsOverrideRequest) PositionY ¶
func (r *SetDeviceMetricsOverrideRequest) PositionY(v int) *SetDeviceMetricsOverrideRequest
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)
func (*SetDeviceMetricsOverrideRequest) Scale ¶
func (r *SetDeviceMetricsOverrideRequest) Scale(v float64) *SetDeviceMetricsOverrideRequest
Scale to apply to resulting view image. Ignored in |fitWindow| mode. (optional)
func (*SetDeviceMetricsOverrideRequest) ScreenHeight ¶
func (r *SetDeviceMetricsOverrideRequest) ScreenHeight(v int) *SetDeviceMetricsOverrideRequest
Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)
func (*SetDeviceMetricsOverrideRequest) ScreenOrientation ¶
func (r *SetDeviceMetricsOverrideRequest) ScreenOrientation(v *emulation.ScreenOrientation) *SetDeviceMetricsOverrideRequest
Screen orientation override. (optional)
func (*SetDeviceMetricsOverrideRequest) ScreenWidth ¶
func (r *SetDeviceMetricsOverrideRequest) ScreenWidth(v int) *SetDeviceMetricsOverrideRequest
Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)
func (*SetDeviceMetricsOverrideRequest) Width ¶
func (r *SetDeviceMetricsOverrideRequest) Width(v int) *SetDeviceMetricsOverrideRequest
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
type SetDeviceOrientationOverrideRequest ¶
type SetDeviceOrientationOverrideRequest struct {
// contains filtered or unexported fields
}
func (*SetDeviceOrientationOverrideRequest) Alpha ¶
func (r *SetDeviceOrientationOverrideRequest) Alpha(v float64) *SetDeviceOrientationOverrideRequest
Mock alpha
func (*SetDeviceOrientationOverrideRequest) Beta ¶
func (r *SetDeviceOrientationOverrideRequest) Beta(v float64) *SetDeviceOrientationOverrideRequest
Mock beta
func (*SetDeviceOrientationOverrideRequest) Do ¶
func (r *SetDeviceOrientationOverrideRequest) Do() error
func (*SetDeviceOrientationOverrideRequest) Gamma ¶
func (r *SetDeviceOrientationOverrideRequest) Gamma(v float64) *SetDeviceOrientationOverrideRequest
Mock gamma
type SetDocumentContentRequest ¶
type SetDocumentContentRequest struct {
// contains filtered or unexported fields
}
func (*SetDocumentContentRequest) Do ¶
func (r *SetDocumentContentRequest) Do() error
func (*SetDocumentContentRequest) FrameId ¶
func (r *SetDocumentContentRequest) FrameId(v FrameId) *SetDocumentContentRequest
Frame id to set HTML for.
func (*SetDocumentContentRequest) Html ¶
func (r *SetDocumentContentRequest) Html(v string) *SetDocumentContentRequest
HTML content to set.
type SetGeolocationOverrideRequest ¶
type SetGeolocationOverrideRequest struct {
// contains filtered or unexported fields
}
func (*SetGeolocationOverrideRequest) Accuracy ¶
func (r *SetGeolocationOverrideRequest) Accuracy(v float64) *SetGeolocationOverrideRequest
Mock accuracy (optional)
func (*SetGeolocationOverrideRequest) Do ¶
func (r *SetGeolocationOverrideRequest) Do() error
func (*SetGeolocationOverrideRequest) Latitude ¶
func (r *SetGeolocationOverrideRequest) Latitude(v float64) *SetGeolocationOverrideRequest
Mock latitude (optional)
func (*SetGeolocationOverrideRequest) Longitude ¶
func (r *SetGeolocationOverrideRequest) Longitude(v float64) *SetGeolocationOverrideRequest
Mock longitude (optional)
type SetTouchEmulationEnabledRequest ¶
type SetTouchEmulationEnabledRequest struct {
// contains filtered or unexported fields
}
func (*SetTouchEmulationEnabledRequest) Configuration ¶
func (r *SetTouchEmulationEnabledRequest) Configuration(v string) *SetTouchEmulationEnabledRequest
Touch/gesture events configuration. Default: current platform. (optional)
func (*SetTouchEmulationEnabledRequest) Do ¶
func (r *SetTouchEmulationEnabledRequest) Do() error
func (*SetTouchEmulationEnabledRequest) Enabled ¶
func (r *SetTouchEmulationEnabledRequest) Enabled(v bool) *SetTouchEmulationEnabledRequest
Whether the touch event emulation should be enabled.
type StartScreencastRequest ¶
type StartScreencastRequest struct {
// contains filtered or unexported fields
}
func (*StartScreencastRequest) Do ¶
func (r *StartScreencastRequest) Do() error
func (*StartScreencastRequest) EveryNthFrame ¶
func (r *StartScreencastRequest) EveryNthFrame(v int) *StartScreencastRequest
Send every n-th frame. (optional)
func (*StartScreencastRequest) Format ¶
func (r *StartScreencastRequest) Format(v string) *StartScreencastRequest
Image compression format. (optional)
func (*StartScreencastRequest) MaxHeight ¶
func (r *StartScreencastRequest) MaxHeight(v int) *StartScreencastRequest
Maximum screenshot height. (optional)
func (*StartScreencastRequest) MaxWidth ¶
func (r *StartScreencastRequest) MaxWidth(v int) *StartScreencastRequest
Maximum screenshot width. (optional)
func (*StartScreencastRequest) Quality ¶
func (r *StartScreencastRequest) Quality(v int) *StartScreencastRequest
Compression quality from range [0..100]. (optional)
type StopLoadingRequest ¶
type StopLoadingRequest struct {
// contains filtered or unexported fields
}
func (*StopLoadingRequest) Do ¶
func (r *StopLoadingRequest) Do() error
type StopScreencastRequest ¶
type StopScreencastRequest struct {
// contains filtered or unexported fields
}
func (*StopScreencastRequest) Do ¶
func (r *StopScreencastRequest) Do() error
type TransitionType ¶
type TransitionType string
type VisualViewport ¶
type VisualViewport struct { // Horizontal offset relative to the layout viewport (CSS pixels). OffsetX float64 `json:"offsetX"` // Vertical offset relative to the layout viewport (CSS pixels). OffsetY float64 `json:"offsetY"` // Horizontal offset relative to the document (CSS pixels). PageX float64 `json:"pageX"` // Vertical offset relative to the document (CSS pixels). PageY float64 `json:"pageY"` // Width (CSS pixels), excludes scrollbar if present. ClientWidth float64 `json:"clientWidth"` // Height (CSS pixels), excludes scrollbar if present. ClientHeight float64 `json:"clientHeight"` // Scale relative to the ideal viewport (size at width=device-width). Scale float64 `json:"scale"` }