cdpdom

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cdpdom implements all the domain methods and events of the Chrome Debugging Protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessibility

type Accessibility struct {
	// contains filtered or unexported fields
}

The Accessibility domain.

func NewAccessibility

func NewAccessibility(conn *rpcc.Conn) *Accessibility

NewAccessibility returns the domain with the connection set to conn.

func (*Accessibility) GetPartialAXTree

GetPartialAXTree invokes the Accessibility method. Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.

type Animation

type Animation struct {
	// contains filtered or unexported fields
}

The Animation domain.

func NewAnimation

func NewAnimation(conn *rpcc.Conn) *Animation

NewAnimation returns the domain with the connection set to conn.

func (*Animation) AnimationCanceled

func (d *Animation) AnimationCanceled(ctx context.Context) (cdpevent.AnimationCanceledClient, error)

AnimationCanceled creates the event client. Event for when an animation has been canceled.

func (*Animation) AnimationCreated

func (d *Animation) AnimationCreated(ctx context.Context) (cdpevent.AnimationCreatedClient, error)

AnimationCreated creates the event client. Event for each animation that has been created.

func (*Animation) AnimationStarted

func (d *Animation) AnimationStarted(ctx context.Context) (cdpevent.AnimationStartedClient, error)

AnimationStarted creates the event client. Event for animation that has been started.

func (*Animation) Disable

func (d *Animation) Disable(ctx context.Context) (err error)

Disable invokes the Animation method. Disables animation domain notifications.

func (*Animation) Enable

func (d *Animation) Enable(ctx context.Context) (err error)

Enable invokes the Animation method. Enables animation domain notifications.

func (*Animation) GetCurrentTime

GetCurrentTime invokes the Animation method. Returns the current time of the an animation.

func (*Animation) GetPlaybackRate

func (d *Animation) GetPlaybackRate(ctx context.Context) (reply *cdpcmd.AnimationGetPlaybackRateReply, err error)

GetPlaybackRate invokes the Animation method. Gets the playback rate of the document timeline.

func (*Animation) ReleaseAnimations

func (d *Animation) ReleaseAnimations(ctx context.Context, args *cdpcmd.AnimationReleaseAnimationsArgs) (err error)

ReleaseAnimations invokes the Animation method. Releases a set of animations to no longer be manipulated.

func (*Animation) ResolveAnimation

ResolveAnimation invokes the Animation method. Gets the remote object of the Animation.

func (*Animation) SeekAnimations

func (d *Animation) SeekAnimations(ctx context.Context, args *cdpcmd.AnimationSeekAnimationsArgs) (err error)

SeekAnimations invokes the Animation method. Seek a set of animations to a particular time within each animation.

func (*Animation) SetPaused

func (d *Animation) SetPaused(ctx context.Context, args *cdpcmd.AnimationSetPausedArgs) (err error)

SetPaused invokes the Animation method. Sets the paused state of a set of animations.

func (*Animation) SetPlaybackRate

func (d *Animation) SetPlaybackRate(ctx context.Context, args *cdpcmd.AnimationSetPlaybackRateArgs) (err error)

SetPlaybackRate invokes the Animation method. Sets the playback rate of the document timeline.

func (*Animation) SetTiming

func (d *Animation) SetTiming(ctx context.Context, args *cdpcmd.AnimationSetTimingArgs) (err error)

SetTiming invokes the Animation method. Sets the timing of an animation node.

type AnimationCanceledClient

type AnimationCanceledClient struct{ rpcc.Stream }

AnimationCanceledClient implements cdpevent.AnimationCanceledClient.

func (*AnimationCanceledClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type AnimationCreatedClient

type AnimationCreatedClient struct{ rpcc.Stream }

AnimationCreatedClient implements cdpevent.AnimationCreatedClient.

func (*AnimationCreatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type AnimationStartedClient

type AnimationStartedClient struct{ rpcc.Stream }

AnimationStartedClient implements cdpevent.AnimationStartedClient.

func (*AnimationStartedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ApplicationCache

type ApplicationCache struct {
	// contains filtered or unexported fields
}

The ApplicationCache domain.

func NewApplicationCache

func NewApplicationCache(conn *rpcc.Conn) *ApplicationCache

NewApplicationCache returns the domain with the connection set to conn.

func (*ApplicationCache) ApplicationCacheStatusUpdated

func (d *ApplicationCache) ApplicationCacheStatusUpdated(ctx context.Context) (cdpevent.ApplicationCacheStatusUpdatedClient, error)

ApplicationCacheStatusUpdated creates the event client.

func (*ApplicationCache) Enable

func (d *ApplicationCache) Enable(ctx context.Context) (err error)

Enable invokes the ApplicationCache method. Enables application cache domain notifications.

func (*ApplicationCache) GetApplicationCacheForFrame

GetApplicationCacheForFrame invokes the ApplicationCache method. Returns relevant application cache data for the document in given frame.

func (*ApplicationCache) GetFramesWithManifests

func (d *ApplicationCache) GetFramesWithManifests(ctx context.Context) (reply *cdpcmd.ApplicationCacheGetFramesWithManifestsReply, err error)

GetFramesWithManifests invokes the ApplicationCache method. Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.

func (*ApplicationCache) GetManifestForFrame

GetManifestForFrame invokes the ApplicationCache method. Returns manifest URL for document in the given frame.

func (*ApplicationCache) NetworkStateUpdated

NetworkStateUpdated creates the event client.

type ApplicationCacheNetworkStateUpdatedClient

type ApplicationCacheNetworkStateUpdatedClient struct{ rpcc.Stream }

ApplicationCacheNetworkStateUpdatedClient implements cdpevent.ApplicationCacheNetworkStateUpdatedClient.

func (*ApplicationCacheNetworkStateUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ApplicationCacheStatusUpdatedClient

type ApplicationCacheStatusUpdatedClient struct{ rpcc.Stream }

ApplicationCacheStatusUpdatedClient implements cdpevent.ApplicationCacheStatusUpdatedClient.

func (*ApplicationCacheStatusUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Browser

type Browser struct {
	// contains filtered or unexported fields
}

The Browser domain. The Browser domain defines methods and events for browser managing.

func NewBrowser

func NewBrowser(conn *rpcc.Conn) *Browser

NewBrowser returns the domain with the connection set to conn.

func (*Browser) GetWindowBounds

func (d *Browser) GetWindowBounds(ctx context.Context, args *cdpcmd.BrowserGetWindowBoundsArgs) (reply *cdpcmd.BrowserGetWindowBoundsReply, err error)

GetWindowBounds invokes the Browser method. Get position and size of the browser window.

func (*Browser) GetWindowForTarget

GetWindowForTarget invokes the Browser method. Get the browser window that contains the devtools target.

func (*Browser) SetWindowBounds

func (d *Browser) SetWindowBounds(ctx context.Context, args *cdpcmd.BrowserSetWindowBoundsArgs) (err error)

SetWindowBounds invokes the Browser method. Set position and/or size of the browser window.

type CSS

type CSS struct {
	// contains filtered or unexported fields
}

The CSS domain. This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated id used in subsequent operations on the related object. Each object type has a specific id structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the get*ForNode() calls (which accept a DOM node id). A client can also keep track of stylesheets via the styleSheetAdded/styleSheetRemoved events and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.

func NewCSS

func NewCSS(conn *rpcc.Conn) *CSS

NewCSS returns the domain with the connection set to conn.

func (*CSS) AddRule

func (d *CSS) AddRule(ctx context.Context, args *cdpcmd.CSSAddRuleArgs) (reply *cdpcmd.CSSAddRuleReply, err error)

AddRule invokes the CSS method. Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.

func (*CSS) CollectClassNames

func (d *CSS) CollectClassNames(ctx context.Context, args *cdpcmd.CSSCollectClassNamesArgs) (reply *cdpcmd.CSSCollectClassNamesReply, err error)

CollectClassNames invokes the CSS method. Returns all class names from specified stylesheet.

func (*CSS) CreateStyleSheet

func (d *CSS) CreateStyleSheet(ctx context.Context, args *cdpcmd.CSSCreateStyleSheetArgs) (reply *cdpcmd.CSSCreateStyleSheetReply, err error)

CreateStyleSheet invokes the CSS method. Creates a new special "via-inspector" stylesheet in the frame with given frameId.

func (*CSS) Disable

func (d *CSS) Disable(ctx context.Context) (err error)

Disable invokes the CSS method. Disables the CSS agent for the given page.

func (*CSS) Enable

func (d *CSS) Enable(ctx context.Context) (err error)

Enable invokes the CSS method. Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.

func (*CSS) FontsUpdated

func (d *CSS) FontsUpdated(ctx context.Context) (cdpevent.CSSFontsUpdatedClient, error)

FontsUpdated creates the event client. Fires whenever a web font gets loaded.

func (*CSS) ForcePseudoState

func (d *CSS) ForcePseudoState(ctx context.Context, args *cdpcmd.CSSForcePseudoStateArgs) (err error)

ForcePseudoState invokes the CSS method. Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.

func (*CSS) GetBackgroundColors

func (d *CSS) GetBackgroundColors(ctx context.Context, args *cdpcmd.CSSGetBackgroundColorsArgs) (reply *cdpcmd.CSSGetBackgroundColorsReply, err error)

GetBackgroundColors invokes the CSS method.

func (*CSS) GetComputedStyleForNode

func (d *CSS) GetComputedStyleForNode(ctx context.Context, args *cdpcmd.CSSGetComputedStyleForNodeArgs) (reply *cdpcmd.CSSGetComputedStyleForNodeReply, err error)

GetComputedStyleForNode invokes the CSS method. Returns the computed style for a DOM node identified by nodeId.

func (*CSS) GetInlineStylesForNode

func (d *CSS) GetInlineStylesForNode(ctx context.Context, args *cdpcmd.CSSGetInlineStylesForNodeArgs) (reply *cdpcmd.CSSGetInlineStylesForNodeReply, err error)

GetInlineStylesForNode invokes the CSS method. Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.

func (*CSS) GetMatchedStylesForNode

func (d *CSS) GetMatchedStylesForNode(ctx context.Context, args *cdpcmd.CSSGetMatchedStylesForNodeArgs) (reply *cdpcmd.CSSGetMatchedStylesForNodeReply, err error)

GetMatchedStylesForNode invokes the CSS method. Returns requested styles for a DOM node identified by nodeId.

func (*CSS) GetMediaQueries

func (d *CSS) GetMediaQueries(ctx context.Context) (reply *cdpcmd.CSSGetMediaQueriesReply, err error)

GetMediaQueries invokes the CSS method. Returns all media queries parsed by the rendering engine.

func (*CSS) GetPlatformFontsForNode

func (d *CSS) GetPlatformFontsForNode(ctx context.Context, args *cdpcmd.CSSGetPlatformFontsForNodeArgs) (reply *cdpcmd.CSSGetPlatformFontsForNodeReply, err error)

GetPlatformFontsForNode invokes the CSS method. Requests information about platform fonts which we used to render child TextNodes in the given node.

func (*CSS) GetStyleSheetText

func (d *CSS) GetStyleSheetText(ctx context.Context, args *cdpcmd.CSSGetStyleSheetTextArgs) (reply *cdpcmd.CSSGetStyleSheetTextReply, err error)

GetStyleSheetText invokes the CSS method. Returns the current textual content and the URL for a stylesheet.

func (*CSS) MediaQueryResultChanged

func (d *CSS) MediaQueryResultChanged(ctx context.Context) (cdpevent.CSSMediaQueryResultChangedClient, error)

MediaQueryResultChanged creates the event client. Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.

func (*CSS) SetEffectivePropertyValueForNode

func (d *CSS) SetEffectivePropertyValueForNode(ctx context.Context, args *cdpcmd.CSSSetEffectivePropertyValueForNodeArgs) (err error)

SetEffectivePropertyValueForNode invokes the CSS method. Find a rule with the given active property for the given node and set the new value for this property

func (*CSS) SetKeyframeKey

func (d *CSS) SetKeyframeKey(ctx context.Context, args *cdpcmd.CSSSetKeyframeKeyArgs) (reply *cdpcmd.CSSSetKeyframeKeyReply, err error)

SetKeyframeKey invokes the CSS method. Modifies the keyframe rule key text.

func (*CSS) SetMediaText

func (d *CSS) SetMediaText(ctx context.Context, args *cdpcmd.CSSSetMediaTextArgs) (reply *cdpcmd.CSSSetMediaTextReply, err error)

SetMediaText invokes the CSS method. Modifies the rule selector.

func (*CSS) SetRuleSelector

func (d *CSS) SetRuleSelector(ctx context.Context, args *cdpcmd.CSSSetRuleSelectorArgs) (reply *cdpcmd.CSSSetRuleSelectorReply, err error)

SetRuleSelector invokes the CSS method. Modifies the rule selector.

func (*CSS) SetStyleSheetText

func (d *CSS) SetStyleSheetText(ctx context.Context, args *cdpcmd.CSSSetStyleSheetTextArgs) (reply *cdpcmd.CSSSetStyleSheetTextReply, err error)

SetStyleSheetText invokes the CSS method. Sets the new stylesheet text.

func (*CSS) SetStyleTexts

func (d *CSS) SetStyleTexts(ctx context.Context, args *cdpcmd.CSSSetStyleTextsArgs) (reply *cdpcmd.CSSSetStyleTextsReply, err error)

SetStyleTexts invokes the CSS method. Applies specified style edits one after another in the given order.

func (*CSS) StartRuleUsageTracking

func (d *CSS) StartRuleUsageTracking(ctx context.Context) (err error)

StartRuleUsageTracking invokes the CSS method. Enables the selector recording.

func (*CSS) StopRuleUsageTracking

func (d *CSS) StopRuleUsageTracking(ctx context.Context) (reply *cdpcmd.CSSStopRuleUsageTrackingReply, err error)

StopRuleUsageTracking invokes the CSS method. The list of rules with an indication of whether these were used

func (*CSS) StyleSheetAdded

func (d *CSS) StyleSheetAdded(ctx context.Context) (cdpevent.CSSStyleSheetAddedClient, error)

StyleSheetAdded creates the event client. Fired whenever an active document stylesheet is added.

func (*CSS) StyleSheetChanged

func (d *CSS) StyleSheetChanged(ctx context.Context) (cdpevent.CSSStyleSheetChangedClient, error)

StyleSheetChanged creates the event client. Fired whenever a stylesheet is changed as a result of the client operation.

func (*CSS) StyleSheetRemoved

func (d *CSS) StyleSheetRemoved(ctx context.Context) (cdpevent.CSSStyleSheetRemovedClient, error)

StyleSheetRemoved creates the event client. Fired whenever an active document stylesheet is removed.

func (*CSS) TakeCoverageDelta

func (d *CSS) TakeCoverageDelta(ctx context.Context) (reply *cdpcmd.CSSTakeCoverageDeltaReply, err error)

TakeCoverageDelta invokes the CSS method. Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)

type CSSFontsUpdatedClient

type CSSFontsUpdatedClient struct{ rpcc.Stream }

CSSFontsUpdatedClient implements cdpevent.CSSFontsUpdatedClient.

func (*CSSFontsUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type CSSMediaQueryResultChangedClient

type CSSMediaQueryResultChangedClient struct{ rpcc.Stream }

CSSMediaQueryResultChangedClient implements cdpevent.CSSMediaQueryResultChangedClient.

func (*CSSMediaQueryResultChangedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type CSSStyleSheetAddedClient

type CSSStyleSheetAddedClient struct{ rpcc.Stream }

CSSStyleSheetAddedClient implements cdpevent.CSSStyleSheetAddedClient.

func (*CSSStyleSheetAddedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type CSSStyleSheetChangedClient

type CSSStyleSheetChangedClient struct{ rpcc.Stream }

CSSStyleSheetChangedClient implements cdpevent.CSSStyleSheetChangedClient.

func (*CSSStyleSheetChangedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type CSSStyleSheetRemovedClient

type CSSStyleSheetRemovedClient struct{ rpcc.Stream }

CSSStyleSheetRemovedClient implements cdpevent.CSSStyleSheetRemovedClient.

func (*CSSStyleSheetRemovedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type CacheStorage

type CacheStorage struct {
	// contains filtered or unexported fields
}

The CacheStorage domain.

func NewCacheStorage

func NewCacheStorage(conn *rpcc.Conn) *CacheStorage

NewCacheStorage returns the domain with the connection set to conn.

func (*CacheStorage) DeleteCache

func (d *CacheStorage) DeleteCache(ctx context.Context, args *cdpcmd.CacheStorageDeleteCacheArgs) (err error)

DeleteCache invokes the CacheStorage method. Deletes a cache.

func (*CacheStorage) DeleteEntry

func (d *CacheStorage) DeleteEntry(ctx context.Context, args *cdpcmd.CacheStorageDeleteEntryArgs) (err error)

DeleteEntry invokes the CacheStorage method. Deletes a cache entry.

func (*CacheStorage) RequestCacheNames

RequestCacheNames invokes the CacheStorage method. Requests cache names.

func (*CacheStorage) RequestEntries

RequestEntries invokes the CacheStorage method. Requests data from cache.

type Console

type Console struct {
	// contains filtered or unexported fields
}

The Console domain. This domain is deprecated - use Runtime or Log instead.

func NewConsole

func NewConsole(conn *rpcc.Conn) *Console

NewConsole returns the domain with the connection set to conn.

func (*Console) ClearMessages

func (d *Console) ClearMessages(ctx context.Context) (err error)

ClearMessages invokes the Console method. Does nothing.

func (*Console) Disable

func (d *Console) Disable(ctx context.Context) (err error)

Disable invokes the Console method. Disables console domain, prevents further console messages from being reported to the client.

func (*Console) Enable

func (d *Console) Enable(ctx context.Context) (err error)

Enable invokes the Console method. Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.

func (*Console) MessageAdded

MessageAdded creates the event client. Issued when new console message is added.

type ConsoleMessageAddedClient

type ConsoleMessageAddedClient struct{ rpcc.Stream }

ConsoleMessageAddedClient implements cdpevent.ConsoleMessageAddedClient.

func (*ConsoleMessageAddedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOM

type DOM struct {
	// contains filtered or unexported fields
}

The DOM domain. This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an id. This id can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.

Note that iframe owner elements will return corresponding document elements as their child nodes.

func NewDOM

func NewDOM(conn *rpcc.Conn) *DOM

NewDOM returns the domain with the connection set to conn.

func (*DOM) AttributeModified

func (d *DOM) AttributeModified(ctx context.Context) (cdpevent.DOMAttributeModifiedClient, error)

AttributeModified creates the event client. Fired when Element's attribute is modified.

func (*DOM) AttributeRemoved

func (d *DOM) AttributeRemoved(ctx context.Context) (cdpevent.DOMAttributeRemovedClient, error)

AttributeRemoved creates the event client. Fired when Element's attribute is removed.

func (*DOM) CharacterDataModified

func (d *DOM) CharacterDataModified(ctx context.Context) (cdpevent.DOMCharacterDataModifiedClient, error)

CharacterDataModified creates the event client. Mirrors DOMCharacterDataModified event.

func (*DOM) ChildNodeCountUpdated

func (d *DOM) ChildNodeCountUpdated(ctx context.Context) (cdpevent.DOMChildNodeCountUpdatedClient, error)

ChildNodeCountUpdated creates the event client. Fired when Container's child node count has changed.

func (*DOM) ChildNodeInserted

func (d *DOM) ChildNodeInserted(ctx context.Context) (cdpevent.DOMChildNodeInsertedClient, error)

ChildNodeInserted creates the event client. Mirrors DOMNodeInserted event.

func (*DOM) ChildNodeRemoved

func (d *DOM) ChildNodeRemoved(ctx context.Context) (cdpevent.DOMChildNodeRemovedClient, error)

ChildNodeRemoved creates the event client. Mirrors DOMNodeRemoved event.

func (*DOM) CollectClassNamesFromSubtree

func (d *DOM) CollectClassNamesFromSubtree(ctx context.Context, args *cdpcmd.DOMCollectClassNamesFromSubtreeArgs) (reply *cdpcmd.DOMCollectClassNamesFromSubtreeReply, err error)

CollectClassNamesFromSubtree invokes the DOM method. Collects class names for the node with given id and all of it's child nodes.

func (*DOM) CopyTo

func (d *DOM) CopyTo(ctx context.Context, args *cdpcmd.DOMCopyToArgs) (reply *cdpcmd.DOMCopyToReply, err error)

CopyTo invokes the DOM method. Creates a deep copy of the specified node and places it into the target container before the given anchor.

func (*DOM) Disable

func (d *DOM) Disable(ctx context.Context) (err error)

Disable invokes the DOM method. Disables DOM agent for the given page.

func (*DOM) DiscardSearchResults

func (d *DOM) DiscardSearchResults(ctx context.Context, args *cdpcmd.DOMDiscardSearchResultsArgs) (err error)

DiscardSearchResults invokes the DOM method. Discards search results from the session with the given id. getSearchResults should no longer be called for that search.

func (*DOM) DistributedNodesUpdated

func (d *DOM) DistributedNodesUpdated(ctx context.Context) (cdpevent.DOMDistributedNodesUpdatedClient, error)

DistributedNodesUpdated creates the event client. Called when distribution is changed.

func (*DOM) DocumentUpdated

func (d *DOM) DocumentUpdated(ctx context.Context) (cdpevent.DOMDocumentUpdatedClient, error)

DocumentUpdated creates the event client. Fired when Document has been totally updated. Node ids are no longer valid.

func (*DOM) Enable

func (d *DOM) Enable(ctx context.Context) (err error)

Enable invokes the DOM method. Enables DOM agent for the given page.

func (*DOM) Focus

func (d *DOM) Focus(ctx context.Context, args *cdpcmd.DOMFocusArgs) (err error)

Focus invokes the DOM method. Focuses the given element.

func (*DOM) GetAttributes

func (d *DOM) GetAttributes(ctx context.Context, args *cdpcmd.DOMGetAttributesArgs) (reply *cdpcmd.DOMGetAttributesReply, err error)

GetAttributes invokes the DOM method. Returns attributes for the specified node.

func (*DOM) GetBoxModel

func (d *DOM) GetBoxModel(ctx context.Context, args *cdpcmd.DOMGetBoxModelArgs) (reply *cdpcmd.DOMGetBoxModelReply, err error)

GetBoxModel invokes the DOM method. Returns boxes for the currently selected nodes.

func (*DOM) GetDocument

func (d *DOM) GetDocument(ctx context.Context, args *cdpcmd.DOMGetDocumentArgs) (reply *cdpcmd.DOMGetDocumentReply, err error)

GetDocument invokes the DOM method. Returns the root DOM node (and optionally the subtree) to the caller.

func (*DOM) GetFlattenedDocument

func (d *DOM) GetFlattenedDocument(ctx context.Context, args *cdpcmd.DOMGetFlattenedDocumentArgs) (reply *cdpcmd.DOMGetFlattenedDocumentReply, err error)

GetFlattenedDocument invokes the DOM method. Returns the root DOM node (and optionally the subtree) to the caller.

func (*DOM) GetNodeForLocation

func (d *DOM) GetNodeForLocation(ctx context.Context, args *cdpcmd.DOMGetNodeForLocationArgs) (reply *cdpcmd.DOMGetNodeForLocationReply, err error)

GetNodeForLocation invokes the DOM method. Returns node id at given location.

func (*DOM) GetOuterHTML

func (d *DOM) GetOuterHTML(ctx context.Context, args *cdpcmd.DOMGetOuterHTMLArgs) (reply *cdpcmd.DOMGetOuterHTMLReply, err error)

GetOuterHTML invokes the DOM method. Returns node's HTML markup.

func (*DOM) GetRelayoutBoundary

func (d *DOM) GetRelayoutBoundary(ctx context.Context, args *cdpcmd.DOMGetRelayoutBoundaryArgs) (reply *cdpcmd.DOMGetRelayoutBoundaryReply, err error)

GetRelayoutBoundary invokes the DOM method. Returns the id of the nearest ancestor that is a relayout boundary.

func (*DOM) GetSearchResults

func (d *DOM) GetSearchResults(ctx context.Context, args *cdpcmd.DOMGetSearchResultsArgs) (reply *cdpcmd.DOMGetSearchResultsReply, err error)

GetSearchResults invokes the DOM method. Returns search results from given fromIndex to given toIndex from the sarch with the given identifier.

func (*DOM) HideHighlight

func (d *DOM) HideHighlight(ctx context.Context) (err error)

HideHighlight invokes the DOM method. Hides any highlight.

func (*DOM) HighlightNode

func (d *DOM) HighlightNode(ctx context.Context) (err error)

HighlightNode invokes the DOM method. Highlights DOM node.

func (*DOM) HighlightRect

func (d *DOM) HighlightRect(ctx context.Context) (err error)

HighlightRect invokes the DOM method. Highlights given rectangle.

func (*DOM) InlineStyleInvalidated

func (d *DOM) InlineStyleInvalidated(ctx context.Context) (cdpevent.DOMInlineStyleInvalidatedClient, error)

InlineStyleInvalidated creates the event client. Fired when Element's inline style is modified via a CSS property modification.

func (*DOM) MarkUndoableState

func (d *DOM) MarkUndoableState(ctx context.Context) (err error)

MarkUndoableState invokes the DOM method. Marks last undoable state.

func (*DOM) MoveTo

func (d *DOM) MoveTo(ctx context.Context, args *cdpcmd.DOMMoveToArgs) (reply *cdpcmd.DOMMoveToReply, err error)

MoveTo invokes the DOM method. Moves node into the new container, places it before the given anchor.

func (*DOM) PerformSearch

func (d *DOM) PerformSearch(ctx context.Context, args *cdpcmd.DOMPerformSearchArgs) (reply *cdpcmd.DOMPerformSearchReply, err error)

PerformSearch invokes the DOM method. Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.

func (*DOM) PseudoElementAdded

func (d *DOM) PseudoElementAdded(ctx context.Context) (cdpevent.DOMPseudoElementAddedClient, error)

PseudoElementAdded creates the event client. Called when a pseudo element is added to an element.

func (*DOM) PseudoElementRemoved

func (d *DOM) PseudoElementRemoved(ctx context.Context) (cdpevent.DOMPseudoElementRemovedClient, error)

PseudoElementRemoved creates the event client. Called when a pseudo element is removed from an element.

func (*DOM) PushNodeByPathToFrontend

func (d *DOM) PushNodeByPathToFrontend(ctx context.Context, args *cdpcmd.DOMPushNodeByPathToFrontendArgs) (reply *cdpcmd.DOMPushNodeByPathToFrontendReply, err error)

PushNodeByPathToFrontend invokes the DOM method. Requests that the node is sent to the caller given its path. // FIXME, use XPath

func (*DOM) PushNodesByBackendIdsToFrontend

func (d *DOM) PushNodesByBackendIdsToFrontend(ctx context.Context, args *cdpcmd.DOMPushNodesByBackendIdsToFrontendArgs) (reply *cdpcmd.DOMPushNodesByBackendIdsToFrontendReply, err error)

PushNodesByBackendIdsToFrontend invokes the DOM method. Requests that a batch of nodes is sent to the caller given their backend node ids.

func (*DOM) QuerySelector

func (d *DOM) QuerySelector(ctx context.Context, args *cdpcmd.DOMQuerySelectorArgs) (reply *cdpcmd.DOMQuerySelectorReply, err error)

QuerySelector invokes the DOM method. Executes querySelector on a given node.

func (*DOM) QuerySelectorAll

func (d *DOM) QuerySelectorAll(ctx context.Context, args *cdpcmd.DOMQuerySelectorAllArgs) (reply *cdpcmd.DOMQuerySelectorAllReply, err error)

QuerySelectorAll invokes the DOM method. Executes querySelectorAll on a given node.

func (*DOM) Redo

func (d *DOM) Redo(ctx context.Context) (err error)

Redo invokes the DOM method. Re-does the last undone action.

func (*DOM) RemoveAttribute

func (d *DOM) RemoveAttribute(ctx context.Context, args *cdpcmd.DOMRemoveAttributeArgs) (err error)

RemoveAttribute invokes the DOM method. Removes attribute with given name from an element with given id.

func (*DOM) RemoveNode

func (d *DOM) RemoveNode(ctx context.Context, args *cdpcmd.DOMRemoveNodeArgs) (err error)

RemoveNode invokes the DOM method. Removes node with given id.

func (*DOM) RequestChildNodes

func (d *DOM) RequestChildNodes(ctx context.Context, args *cdpcmd.DOMRequestChildNodesArgs) (err error)

RequestChildNodes invokes the DOM method. Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.

func (*DOM) RequestNode

func (d *DOM) RequestNode(ctx context.Context, args *cdpcmd.DOMRequestNodeArgs) (reply *cdpcmd.DOMRequestNodeReply, err error)

RequestNode invokes the DOM method. Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of setChildNodes notifications.

func (*DOM) ResolveNode

func (d *DOM) ResolveNode(ctx context.Context, args *cdpcmd.DOMResolveNodeArgs) (reply *cdpcmd.DOMResolveNodeReply, err error)

ResolveNode invokes the DOM method. Resolves JavaScript node object for given node id.

func (*DOM) SetAttributeValue

func (d *DOM) SetAttributeValue(ctx context.Context, args *cdpcmd.DOMSetAttributeValueArgs) (err error)

SetAttributeValue invokes the DOM method. Sets attribute for an element with given id.

func (*DOM) SetAttributesAsText

func (d *DOM) SetAttributesAsText(ctx context.Context, args *cdpcmd.DOMSetAttributesAsTextArgs) (err error)

SetAttributesAsText invokes the DOM method. Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.

func (*DOM) SetChildNodes

func (d *DOM) SetChildNodes(ctx context.Context) (cdpevent.DOMSetChildNodesClient, error)

SetChildNodes creates the event client. Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

func (*DOM) SetFileInputFiles

func (d *DOM) SetFileInputFiles(ctx context.Context, args *cdpcmd.DOMSetFileInputFilesArgs) (err error)

SetFileInputFiles invokes the DOM method. Sets files for the given file input element.

func (*DOM) SetInspectedNode

func (d *DOM) SetInspectedNode(ctx context.Context, args *cdpcmd.DOMSetInspectedNodeArgs) (err error)

SetInspectedNode invokes the DOM method. Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

func (*DOM) SetNodeName

func (d *DOM) SetNodeName(ctx context.Context, args *cdpcmd.DOMSetNodeNameArgs) (reply *cdpcmd.DOMSetNodeNameReply, err error)

SetNodeName invokes the DOM method. Sets node name for a node with given id.

func (*DOM) SetNodeValue

func (d *DOM) SetNodeValue(ctx context.Context, args *cdpcmd.DOMSetNodeValueArgs) (err error)

SetNodeValue invokes the DOM method. Sets node value for a node with given id.

func (*DOM) SetOuterHTML

func (d *DOM) SetOuterHTML(ctx context.Context, args *cdpcmd.DOMSetOuterHTMLArgs) (err error)

SetOuterHTML invokes the DOM method. Sets node HTML markup, returns new node id.

func (*DOM) ShadowRootPopped

func (d *DOM) ShadowRootPopped(ctx context.Context) (cdpevent.DOMShadowRootPoppedClient, error)

ShadowRootPopped creates the event client. Called when shadow root is popped from the element.

func (*DOM) ShadowRootPushed

func (d *DOM) ShadowRootPushed(ctx context.Context) (cdpevent.DOMShadowRootPushedClient, error)

ShadowRootPushed creates the event client. Called when shadow root is pushed into the element.

func (*DOM) Undo

func (d *DOM) Undo(ctx context.Context) (err error)

Undo invokes the DOM method. Undoes the last performed action.

type DOMAttributeModifiedClient

type DOMAttributeModifiedClient struct{ rpcc.Stream }

DOMAttributeModifiedClient implements cdpevent.DOMAttributeModifiedClient.

func (*DOMAttributeModifiedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMAttributeRemovedClient

type DOMAttributeRemovedClient struct{ rpcc.Stream }

DOMAttributeRemovedClient implements cdpevent.DOMAttributeRemovedClient.

func (*DOMAttributeRemovedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMCharacterDataModifiedClient

type DOMCharacterDataModifiedClient struct{ rpcc.Stream }

DOMCharacterDataModifiedClient implements cdpevent.DOMCharacterDataModifiedClient.

func (*DOMCharacterDataModifiedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMChildNodeCountUpdatedClient

type DOMChildNodeCountUpdatedClient struct{ rpcc.Stream }

DOMChildNodeCountUpdatedClient implements cdpevent.DOMChildNodeCountUpdatedClient.

func (*DOMChildNodeCountUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMChildNodeInsertedClient

type DOMChildNodeInsertedClient struct{ rpcc.Stream }

DOMChildNodeInsertedClient implements cdpevent.DOMChildNodeInsertedClient.

func (*DOMChildNodeInsertedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMChildNodeRemovedClient

type DOMChildNodeRemovedClient struct{ rpcc.Stream }

DOMChildNodeRemovedClient implements cdpevent.DOMChildNodeRemovedClient.

func (*DOMChildNodeRemovedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMDebugger

type DOMDebugger struct {
	// contains filtered or unexported fields
}

The DOMDebugger domain. DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.

func NewDOMDebugger

func NewDOMDebugger(conn *rpcc.Conn) *DOMDebugger

NewDOMDebugger returns the domain with the connection set to conn.

func (*DOMDebugger) GetEventListeners

GetEventListeners invokes the DOMDebugger method. Returns event listeners of the given object.

func (*DOMDebugger) RemoveDOMBreakpoint

func (d *DOMDebugger) RemoveDOMBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerRemoveDOMBreakpointArgs) (err error)

RemoveDOMBreakpoint invokes the DOMDebugger method. Removes DOM breakpoint that was set using setDOMBreakpoint.

func (*DOMDebugger) RemoveEventListenerBreakpoint

func (d *DOMDebugger) RemoveEventListenerBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerRemoveEventListenerBreakpointArgs) (err error)

RemoveEventListenerBreakpoint invokes the DOMDebugger method. Removes breakpoint on particular DOM event.

func (*DOMDebugger) RemoveInstrumentationBreakpoint

func (d *DOMDebugger) RemoveInstrumentationBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerRemoveInstrumentationBreakpointArgs) (err error)

RemoveInstrumentationBreakpoint invokes the DOMDebugger method. Removes breakpoint on particular native event.

func (*DOMDebugger) RemoveXHRBreakpoint

func (d *DOMDebugger) RemoveXHRBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerRemoveXHRBreakpointArgs) (err error)

RemoveXHRBreakpoint invokes the DOMDebugger method. Removes breakpoint from XMLHttpRequest.

func (*DOMDebugger) SetDOMBreakpoint

func (d *DOMDebugger) SetDOMBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerSetDOMBreakpointArgs) (err error)

SetDOMBreakpoint invokes the DOMDebugger method. Sets breakpoint on particular operation with DOM.

func (*DOMDebugger) SetEventListenerBreakpoint

func (d *DOMDebugger) SetEventListenerBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerSetEventListenerBreakpointArgs) (err error)

SetEventListenerBreakpoint invokes the DOMDebugger method. Sets breakpoint on particular DOM event.

func (*DOMDebugger) SetInstrumentationBreakpoint

func (d *DOMDebugger) SetInstrumentationBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerSetInstrumentationBreakpointArgs) (err error)

SetInstrumentationBreakpoint invokes the DOMDebugger method. Sets breakpoint on particular native event.

func (*DOMDebugger) SetXHRBreakpoint

func (d *DOMDebugger) SetXHRBreakpoint(ctx context.Context, args *cdpcmd.DOMDebuggerSetXHRBreakpointArgs) (err error)

SetXHRBreakpoint invokes the DOMDebugger method. Sets breakpoint on XMLHttpRequest.

type DOMDistributedNodesUpdatedClient

type DOMDistributedNodesUpdatedClient struct{ rpcc.Stream }

DOMDistributedNodesUpdatedClient implements cdpevent.DOMDistributedNodesUpdatedClient.

func (*DOMDistributedNodesUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMDocumentUpdatedClient

type DOMDocumentUpdatedClient struct{ rpcc.Stream }

DOMDocumentUpdatedClient implements cdpevent.DOMDocumentUpdatedClient.

func (*DOMDocumentUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMInlineStyleInvalidatedClient

type DOMInlineStyleInvalidatedClient struct{ rpcc.Stream }

DOMInlineStyleInvalidatedClient implements cdpevent.DOMInlineStyleInvalidatedClient.

func (*DOMInlineStyleInvalidatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMPseudoElementAddedClient

type DOMPseudoElementAddedClient struct{ rpcc.Stream }

DOMPseudoElementAddedClient implements cdpevent.DOMPseudoElementAddedClient.

func (*DOMPseudoElementAddedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMPseudoElementRemovedClient

type DOMPseudoElementRemovedClient struct{ rpcc.Stream }

DOMPseudoElementRemovedClient implements cdpevent.DOMPseudoElementRemovedClient.

func (*DOMPseudoElementRemovedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMSetChildNodesClient

type DOMSetChildNodesClient struct{ rpcc.Stream }

DOMSetChildNodesClient implements cdpevent.DOMSetChildNodesClient.

func (*DOMSetChildNodesClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMShadowRootPoppedClient

type DOMShadowRootPoppedClient struct{ rpcc.Stream }

DOMShadowRootPoppedClient implements cdpevent.DOMShadowRootPoppedClient.

func (*DOMShadowRootPoppedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMShadowRootPushedClient

type DOMShadowRootPushedClient struct{ rpcc.Stream }

DOMShadowRootPushedClient implements cdpevent.DOMShadowRootPushedClient.

func (*DOMShadowRootPushedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMSnapshot

type DOMSnapshot struct {
	// contains filtered or unexported fields
}

The DOMSnapshot domain. This domain facilitates obtaining document snapshots with DOM, layout, and style information.

func NewDOMSnapshot

func NewDOMSnapshot(conn *rpcc.Conn) *DOMSnapshot

NewDOMSnapshot returns the domain with the connection set to conn.

func (*DOMSnapshot) GetSnapshot

GetSnapshot invokes the DOMSnapshot method. Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.

type DOMStorage

type DOMStorage struct {
	// contains filtered or unexported fields
}

The DOMStorage domain. Query and modify DOM storage.

func NewDOMStorage

func NewDOMStorage(conn *rpcc.Conn) *DOMStorage

NewDOMStorage returns the domain with the connection set to conn.

func (*DOMStorage) Clear

func (d *DOMStorage) Clear(ctx context.Context, args *cdpcmd.DOMStorageClearArgs) (err error)

Clear invokes the DOMStorage method.

func (*DOMStorage) DOMStorageItemAdded

func (d *DOMStorage) DOMStorageItemAdded(ctx context.Context) (cdpevent.DOMStorageItemAddedClient, error)

DOMStorageItemAdded creates the event client.

func (*DOMStorage) DOMStorageItemRemoved

func (d *DOMStorage) DOMStorageItemRemoved(ctx context.Context) (cdpevent.DOMStorageItemRemovedClient, error)

DOMStorageItemRemoved creates the event client.

func (*DOMStorage) DOMStorageItemUpdated

func (d *DOMStorage) DOMStorageItemUpdated(ctx context.Context) (cdpevent.DOMStorageItemUpdatedClient, error)

DOMStorageItemUpdated creates the event client.

func (*DOMStorage) DOMStorageItemsCleared

func (d *DOMStorage) DOMStorageItemsCleared(ctx context.Context) (cdpevent.DOMStorageItemsClearedClient, error)

DOMStorageItemsCleared creates the event client.

func (*DOMStorage) Disable

func (d *DOMStorage) Disable(ctx context.Context) (err error)

Disable invokes the DOMStorage method. Disables storage tracking, prevents storage events from being sent to the client.

func (*DOMStorage) Enable

func (d *DOMStorage) Enable(ctx context.Context) (err error)

Enable invokes the DOMStorage method. Enables storage tracking, storage events will now be delivered to the client.

func (*DOMStorage) GetDOMStorageItems

GetDOMStorageItems invokes the DOMStorage method.

func (*DOMStorage) RemoveDOMStorageItem

func (d *DOMStorage) RemoveDOMStorageItem(ctx context.Context, args *cdpcmd.DOMStorageRemoveDOMStorageItemArgs) (err error)

RemoveDOMStorageItem invokes the DOMStorage method.

func (*DOMStorage) SetDOMStorageItem

func (d *DOMStorage) SetDOMStorageItem(ctx context.Context, args *cdpcmd.DOMStorageSetDOMStorageItemArgs) (err error)

SetDOMStorageItem invokes the DOMStorage method.

type DOMStorageItemAddedClient

type DOMStorageItemAddedClient struct{ rpcc.Stream }

DOMStorageItemAddedClient implements cdpevent.DOMStorageItemAddedClient.

func (*DOMStorageItemAddedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMStorageItemRemovedClient

type DOMStorageItemRemovedClient struct{ rpcc.Stream }

DOMStorageItemRemovedClient implements cdpevent.DOMStorageItemRemovedClient.

func (*DOMStorageItemRemovedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMStorageItemUpdatedClient

type DOMStorageItemUpdatedClient struct{ rpcc.Stream }

DOMStorageItemUpdatedClient implements cdpevent.DOMStorageItemUpdatedClient.

func (*DOMStorageItemUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DOMStorageItemsClearedClient

type DOMStorageItemsClearedClient struct{ rpcc.Stream }

DOMStorageItemsClearedClient implements cdpevent.DOMStorageItemsClearedClient.

func (*DOMStorageItemsClearedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Database

type Database struct {
	// contains filtered or unexported fields
}

The Database domain.

func NewDatabase

func NewDatabase(conn *rpcc.Conn) *Database

NewDatabase returns the domain with the connection set to conn.

func (*Database) AddDatabase

AddDatabase creates the event client.

func (*Database) Disable

func (d *Database) Disable(ctx context.Context) (err error)

Disable invokes the Database method. Disables database tracking, prevents database events from being sent to the client.

func (*Database) Enable

func (d *Database) Enable(ctx context.Context) (err error)

Enable invokes the Database method. Enables database tracking, database events will now be delivered to the client.

func (*Database) ExecuteSQL

func (d *Database) ExecuteSQL(ctx context.Context, args *cdpcmd.DatabaseExecuteSQLArgs) (reply *cdpcmd.DatabaseExecuteSQLReply, err error)

ExecuteSQL invokes the Database method.

func (*Database) GetDatabaseTableNames

GetDatabaseTableNames invokes the Database method.

type DatabaseAddDatabaseClient

type DatabaseAddDatabaseClient struct{ rpcc.Stream }

DatabaseAddDatabaseClient implements cdpevent.DatabaseAddDatabaseClient.

func (*DatabaseAddDatabaseClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Debugger

type Debugger struct {
	// contains filtered or unexported fields
}

The Debugger domain. Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.

func NewDebugger

func NewDebugger(conn *rpcc.Conn) *Debugger

NewDebugger returns the domain with the connection set to conn.

func (*Debugger) BreakpointResolved

BreakpointResolved creates the event client. Fired when breakpoint is resolved to an actual script and location.

func (*Debugger) ContinueToLocation

func (d *Debugger) ContinueToLocation(ctx context.Context, args *cdpcmd.DebuggerContinueToLocationArgs) (err error)

ContinueToLocation invokes the Debugger method. Continues execution until specific location is reached.

func (*Debugger) Disable

func (d *Debugger) Disable(ctx context.Context) (err error)

Disable invokes the Debugger method. Disables debugger for given page.

func (*Debugger) Enable

func (d *Debugger) Enable(ctx context.Context) (err error)

Enable invokes the Debugger method. Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

func (*Debugger) EvaluateOnCallFrame

EvaluateOnCallFrame invokes the Debugger method. Evaluates expression on a given call frame.

func (*Debugger) GetPossibleBreakpoints

GetPossibleBreakpoints invokes the Debugger method. Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.

func (*Debugger) GetScriptSource

GetScriptSource invokes the Debugger method. Returns source for the script with given id.

func (*Debugger) Pause

func (d *Debugger) Pause(ctx context.Context) (err error)

Pause invokes the Debugger method. Stops on the next JavaScript statement.

func (*Debugger) Paused

Paused creates the event client. Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.

func (*Debugger) RemoveBreakpoint

func (d *Debugger) RemoveBreakpoint(ctx context.Context, args *cdpcmd.DebuggerRemoveBreakpointArgs) (err error)

RemoveBreakpoint invokes the Debugger method. Removes JavaScript breakpoint.

func (*Debugger) RestartFrame

RestartFrame invokes the Debugger method. Restarts particular call frame from the beginning.

func (*Debugger) Resume

func (d *Debugger) Resume(ctx context.Context) (err error)

Resume invokes the Debugger method. Resumes JavaScript execution.

func (*Debugger) Resumed

Resumed creates the event client. Fired when the virtual machine resumed execution.

func (*Debugger) ScheduleStepIntoAsync

func (d *Debugger) ScheduleStepIntoAsync(ctx context.Context) (err error)

ScheduleStepIntoAsync invokes the Debugger method. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.

func (*Debugger) ScriptFailedToParse

ScriptFailedToParse creates the event client. Fired when virtual machine fails to parse the script.

func (*Debugger) ScriptParsed

ScriptParsed creates the event client. Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.

func (*Debugger) SearchInContent

SearchInContent invokes the Debugger method. Searches for given string in script content.

func (*Debugger) SetAsyncCallStackDepth

func (d *Debugger) SetAsyncCallStackDepth(ctx context.Context, args *cdpcmd.DebuggerSetAsyncCallStackDepthArgs) (err error)

SetAsyncCallStackDepth invokes the Debugger method. Enables or disables async call stacks tracking.

func (*Debugger) SetBlackboxPatterns

func (d *Debugger) SetBlackboxPatterns(ctx context.Context, args *cdpcmd.DebuggerSetBlackboxPatternsArgs) (err error)

SetBlackboxPatterns invokes the Debugger method. Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.

func (*Debugger) SetBlackboxedRanges

func (d *Debugger) SetBlackboxedRanges(ctx context.Context, args *cdpcmd.DebuggerSetBlackboxedRangesArgs) (err error)

SetBlackboxedRanges invokes the Debugger method. Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.

func (*Debugger) SetBreakpoint

SetBreakpoint invokes the Debugger method. Sets JavaScript breakpoint at a given location.

func (*Debugger) SetBreakpointByURL

SetBreakpointByURL invokes the Debugger method. Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.

func (*Debugger) SetBreakpointsActive

func (d *Debugger) SetBreakpointsActive(ctx context.Context, args *cdpcmd.DebuggerSetBreakpointsActiveArgs) (err error)

SetBreakpointsActive invokes the Debugger method. Activates / deactivates all breakpoints on the page.

func (*Debugger) SetPauseOnExceptions

func (d *Debugger) SetPauseOnExceptions(ctx context.Context, args *cdpcmd.DebuggerSetPauseOnExceptionsArgs) (err error)

SetPauseOnExceptions invokes the Debugger method. Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none.

func (*Debugger) SetScriptSource

SetScriptSource invokes the Debugger method. Edits JavaScript source live.

func (*Debugger) SetSkipAllPauses

func (d *Debugger) SetSkipAllPauses(ctx context.Context, args *cdpcmd.DebuggerSetSkipAllPausesArgs) (err error)

SetSkipAllPauses invokes the Debugger method. Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

func (*Debugger) SetVariableValue

func (d *Debugger) SetVariableValue(ctx context.Context, args *cdpcmd.DebuggerSetVariableValueArgs) (err error)

SetVariableValue invokes the Debugger method. Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

func (*Debugger) StepInto

func (d *Debugger) StepInto(ctx context.Context) (err error)

StepInto invokes the Debugger method. Steps into the function call.

func (*Debugger) StepOut

func (d *Debugger) StepOut(ctx context.Context) (err error)

StepOut invokes the Debugger method. Steps out of the function call.

func (*Debugger) StepOver

func (d *Debugger) StepOver(ctx context.Context) (err error)

StepOver invokes the Debugger method. Steps over the statement.

type DebuggerBreakpointResolvedClient

type DebuggerBreakpointResolvedClient struct{ rpcc.Stream }

DebuggerBreakpointResolvedClient implements cdpevent.DebuggerBreakpointResolvedClient.

func (*DebuggerBreakpointResolvedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DebuggerPausedClient

type DebuggerPausedClient struct{ rpcc.Stream }

DebuggerPausedClient implements cdpevent.DebuggerPausedClient.

func (*DebuggerPausedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DebuggerResumedClient

type DebuggerResumedClient struct{ rpcc.Stream }

DebuggerResumedClient implements cdpevent.DebuggerResumedClient.

func (*DebuggerResumedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DebuggerScriptFailedToParseClient

type DebuggerScriptFailedToParseClient struct{ rpcc.Stream }

DebuggerScriptFailedToParseClient implements cdpevent.DebuggerScriptFailedToParseClient.

func (*DebuggerScriptFailedToParseClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DebuggerScriptParsedClient

type DebuggerScriptParsedClient struct{ rpcc.Stream }

DebuggerScriptParsedClient implements cdpevent.DebuggerScriptParsedClient.

func (*DebuggerScriptParsedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type DeviceOrientation

type DeviceOrientation struct {
	// contains filtered or unexported fields
}

The DeviceOrientation domain.

func NewDeviceOrientation

func NewDeviceOrientation(conn *rpcc.Conn) *DeviceOrientation

NewDeviceOrientation returns the domain with the connection set to conn.

func (*DeviceOrientation) ClearDeviceOrientationOverride

func (d *DeviceOrientation) ClearDeviceOrientationOverride(ctx context.Context) (err error)

ClearDeviceOrientationOverride invokes the DeviceOrientation method. Clears the overridden Device Orientation.

func (*DeviceOrientation) SetDeviceOrientationOverride

func (d *DeviceOrientation) SetDeviceOrientationOverride(ctx context.Context, args *cdpcmd.DeviceOrientationSetDeviceOrientationOverrideArgs) (err error)

SetDeviceOrientationOverride invokes the DeviceOrientation method. Overrides the Device Orientation.

type Emulation

type Emulation struct {
	// contains filtered or unexported fields
}

The Emulation domain. This domain emulates different environments for the page.

func NewEmulation

func NewEmulation(conn *rpcc.Conn) *Emulation

NewEmulation returns the domain with the connection set to conn.

func (*Emulation) CanEmulate

func (d *Emulation) CanEmulate(ctx context.Context) (reply *cdpcmd.EmulationCanEmulateReply, err error)

CanEmulate invokes the Emulation method. Tells whether emulation is supported.

func (*Emulation) ClearDeviceMetricsOverride

func (d *Emulation) ClearDeviceMetricsOverride(ctx context.Context) (err error)

ClearDeviceMetricsOverride invokes the Emulation method. Clears the overridden device metrics.

func (*Emulation) ClearGeolocationOverride

func (d *Emulation) ClearGeolocationOverride(ctx context.Context) (err error)

ClearGeolocationOverride invokes the Emulation method. Clears the overridden Geolocation Position and Error.

func (*Emulation) ForceViewport

func (d *Emulation) ForceViewport(ctx context.Context, args *cdpcmd.EmulationForceViewportArgs) (err error)

ForceViewport invokes the Emulation method. Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.

func (*Emulation) ResetPageScaleFactor

func (d *Emulation) ResetPageScaleFactor(ctx context.Context) (err error)

ResetPageScaleFactor invokes the Emulation method. Requests that page scale factor is reset to initial values.

func (*Emulation) ResetViewport

func (d *Emulation) ResetViewport(ctx context.Context) (err error)

ResetViewport invokes the Emulation method. Resets the visible area of the page to the original viewport, undoing any effects of the forceViewport command.

func (*Emulation) SetCPUThrottlingRate

func (d *Emulation) SetCPUThrottlingRate(ctx context.Context, args *cdpcmd.EmulationSetCPUThrottlingRateArgs) (err error)

SetCPUThrottlingRate invokes the Emulation method. Enables CPU throttling to emulate slow CPUs.

func (*Emulation) SetDefaultBackgroundColorOverride

func (d *Emulation) SetDefaultBackgroundColorOverride(ctx context.Context, args *cdpcmd.EmulationSetDefaultBackgroundColorOverrideArgs) (err error)

SetDefaultBackgroundColorOverride invokes the Emulation method. Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.

func (*Emulation) SetDeviceMetricsOverride

func (d *Emulation) SetDeviceMetricsOverride(ctx context.Context, args *cdpcmd.EmulationSetDeviceMetricsOverrideArgs) (err error)

SetDeviceMetricsOverride invokes the Emulation method. 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).

func (*Emulation) SetEmulatedMedia

func (d *Emulation) SetEmulatedMedia(ctx context.Context, args *cdpcmd.EmulationSetEmulatedMediaArgs) (err error)

SetEmulatedMedia invokes the Emulation method. Emulates the given media for CSS media queries.

func (*Emulation) SetGeolocationOverride

func (d *Emulation) SetGeolocationOverride(ctx context.Context, args *cdpcmd.EmulationSetGeolocationOverrideArgs) (err error)

SetGeolocationOverride invokes the Emulation method. Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func (*Emulation) SetPageScaleFactor

func (d *Emulation) SetPageScaleFactor(ctx context.Context, args *cdpcmd.EmulationSetPageScaleFactorArgs) (err error)

SetPageScaleFactor invokes the Emulation method. Sets a specified page scale factor.

func (*Emulation) SetScriptExecutionDisabled

func (d *Emulation) SetScriptExecutionDisabled(ctx context.Context, args *cdpcmd.EmulationSetScriptExecutionDisabledArgs) (err error)

SetScriptExecutionDisabled invokes the Emulation method. Switches script execution in the page.

func (*Emulation) SetTouchEmulationEnabled

func (d *Emulation) SetTouchEmulationEnabled(ctx context.Context, args *cdpcmd.EmulationSetTouchEmulationEnabledArgs) (err error)

SetTouchEmulationEnabled invokes the Emulation method. Toggles mouse event-based touch event emulation.

func (*Emulation) SetVirtualTimePolicy

func (d *Emulation) SetVirtualTimePolicy(ctx context.Context, args *cdpcmd.EmulationSetVirtualTimePolicyArgs) (err error)

SetVirtualTimePolicy invokes the Emulation method. Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.

func (*Emulation) SetVisibleSize

func (d *Emulation) SetVisibleSize(ctx context.Context, args *cdpcmd.EmulationSetVisibleSizeArgs) (err error)

SetVisibleSize invokes the Emulation method. Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.

func (*Emulation) VirtualTimeBudgetExpired

func (d *Emulation) VirtualTimeBudgetExpired(ctx context.Context) (cdpevent.EmulationVirtualTimeBudgetExpiredClient, error)

VirtualTimeBudgetExpired creates the event client. Notification sent after the virual time budget for the current VirtualTimePolicy has run out.

type EmulationVirtualTimeBudgetExpiredClient

type EmulationVirtualTimeBudgetExpiredClient struct{ rpcc.Stream }

EmulationVirtualTimeBudgetExpiredClient implements cdpevent.EmulationVirtualTimeBudgetExpiredClient.

func (*EmulationVirtualTimeBudgetExpiredClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type HeapProfiler

type HeapProfiler struct {
	// contains filtered or unexported fields
}

The HeapProfiler domain.

func NewHeapProfiler

func NewHeapProfiler(conn *rpcc.Conn) *HeapProfiler

NewHeapProfiler returns the domain with the connection set to conn.

func (*HeapProfiler) AddHeapSnapshotChunk

AddHeapSnapshotChunk creates the event client.

func (*HeapProfiler) AddInspectedHeapObject

func (d *HeapProfiler) AddInspectedHeapObject(ctx context.Context, args *cdpcmd.HeapProfilerAddInspectedHeapObjectArgs) (err error)

AddInspectedHeapObject invokes the HeapProfiler method. Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

func (*HeapProfiler) CollectGarbage

func (d *HeapProfiler) CollectGarbage(ctx context.Context) (err error)

CollectGarbage invokes the HeapProfiler method.

func (*HeapProfiler) Disable

func (d *HeapProfiler) Disable(ctx context.Context) (err error)

Disable invokes the HeapProfiler method.

func (*HeapProfiler) Enable

func (d *HeapProfiler) Enable(ctx context.Context) (err error)

Enable invokes the HeapProfiler method.

func (*HeapProfiler) GetHeapObjectID

GetHeapObjectID invokes the HeapProfiler method.

func (*HeapProfiler) GetObjectByHeapObjectID

GetObjectByHeapObjectID invokes the HeapProfiler method.

func (*HeapProfiler) HeapStatsUpdate

HeapStatsUpdate creates the event client. If heap objects tracking has been started then backend may send update for one or more fragments

func (*HeapProfiler) LastSeenObjectID

LastSeenObjectID creates the event client. If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.

func (*HeapProfiler) ReportHeapSnapshotProgress

ReportHeapSnapshotProgress creates the event client.

func (*HeapProfiler) ResetProfiles

ResetProfiles creates the event client.

func (*HeapProfiler) StartSampling

func (d *HeapProfiler) StartSampling(ctx context.Context, args *cdpcmd.HeapProfilerStartSamplingArgs) (err error)

StartSampling invokes the HeapProfiler method.

func (*HeapProfiler) StartTrackingHeapObjects

func (d *HeapProfiler) StartTrackingHeapObjects(ctx context.Context, args *cdpcmd.HeapProfilerStartTrackingHeapObjectsArgs) (err error)

StartTrackingHeapObjects invokes the HeapProfiler method.

func (*HeapProfiler) StopSampling

func (d *HeapProfiler) StopSampling(ctx context.Context) (reply *cdpcmd.HeapProfilerStopSamplingReply, err error)

StopSampling invokes the HeapProfiler method.

func (*HeapProfiler) StopTrackingHeapObjects

func (d *HeapProfiler) StopTrackingHeapObjects(ctx context.Context, args *cdpcmd.HeapProfilerStopTrackingHeapObjectsArgs) (err error)

StopTrackingHeapObjects invokes the HeapProfiler method.

func (*HeapProfiler) TakeHeapSnapshot

func (d *HeapProfiler) TakeHeapSnapshot(ctx context.Context, args *cdpcmd.HeapProfilerTakeHeapSnapshotArgs) (err error)

TakeHeapSnapshot invokes the HeapProfiler method.

type HeapProfilerAddHeapSnapshotChunkClient

type HeapProfilerAddHeapSnapshotChunkClient struct{ rpcc.Stream }

HeapProfilerAddHeapSnapshotChunkClient implements cdpevent.HeapProfilerAddHeapSnapshotChunkClient.

func (*HeapProfilerAddHeapSnapshotChunkClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type HeapProfilerHeapStatsUpdateClient

type HeapProfilerHeapStatsUpdateClient struct{ rpcc.Stream }

HeapProfilerHeapStatsUpdateClient implements cdpevent.HeapProfilerHeapStatsUpdateClient.

func (*HeapProfilerHeapStatsUpdateClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type HeapProfilerLastSeenObjectIDClient

type HeapProfilerLastSeenObjectIDClient struct{ rpcc.Stream }

HeapProfilerLastSeenObjectIDClient implements cdpevent.HeapProfilerLastSeenObjectIDClient.

func (*HeapProfilerLastSeenObjectIDClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type HeapProfilerReportHeapSnapshotProgressClient

type HeapProfilerReportHeapSnapshotProgressClient struct{ rpcc.Stream }

HeapProfilerReportHeapSnapshotProgressClient implements cdpevent.HeapProfilerReportHeapSnapshotProgressClient.

func (*HeapProfilerReportHeapSnapshotProgressClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type HeapProfilerResetProfilesClient

type HeapProfilerResetProfilesClient struct{ rpcc.Stream }

HeapProfilerResetProfilesClient implements cdpevent.HeapProfilerResetProfilesClient.

func (*HeapProfilerResetProfilesClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type IO

type IO struct {
	// contains filtered or unexported fields
}

The IO domain. Input/Output operations for streams produced by DevTools.

func NewIO

func NewIO(conn *rpcc.Conn) *IO

NewIO returns the domain with the connection set to conn.

func (*IO) Close

func (d *IO) Close(ctx context.Context, args *cdpcmd.IOCloseArgs) (err error)

Close invokes the IO method. Close the stream, discard any temporary backing storage.

func (*IO) Read

func (d *IO) Read(ctx context.Context, args *cdpcmd.IOReadArgs) (reply *cdpcmd.IOReadReply, err error)

Read invokes the IO method. Read a chunk of the stream

type IndexedDB

type IndexedDB struct {
	// contains filtered or unexported fields
}

The IndexedDB domain.

func NewIndexedDB

func NewIndexedDB(conn *rpcc.Conn) *IndexedDB

NewIndexedDB returns the domain with the connection set to conn.

func (*IndexedDB) ClearObjectStore

func (d *IndexedDB) ClearObjectStore(ctx context.Context, args *cdpcmd.IndexedDBClearObjectStoreArgs) (err error)

ClearObjectStore invokes the IndexedDB method. Clears all entries from an object store.

func (*IndexedDB) DeleteDatabase

func (d *IndexedDB) DeleteDatabase(ctx context.Context, args *cdpcmd.IndexedDBDeleteDatabaseArgs) (err error)

DeleteDatabase invokes the IndexedDB method. Deletes a database.

func (*IndexedDB) Disable

func (d *IndexedDB) Disable(ctx context.Context) (err error)

Disable invokes the IndexedDB method. Disables events from backend.

func (*IndexedDB) Enable

func (d *IndexedDB) Enable(ctx context.Context) (err error)

Enable invokes the IndexedDB method. Enables events from backend.

func (*IndexedDB) RequestData

RequestData invokes the IndexedDB method. Requests data from object store or index.

func (*IndexedDB) RequestDatabase

RequestDatabase invokes the IndexedDB method. Requests database with given name in given frame.

func (*IndexedDB) RequestDatabaseNames

RequestDatabaseNames invokes the IndexedDB method. Requests database names for given security origin.

type Input

type Input struct {
	// contains filtered or unexported fields
}

The Input domain.

func NewInput

func NewInput(conn *rpcc.Conn) *Input

NewInput returns the domain with the connection set to conn.

func (*Input) DispatchKeyEvent

func (d *Input) DispatchKeyEvent(ctx context.Context, args *cdpcmd.InputDispatchKeyEventArgs) (err error)

DispatchKeyEvent invokes the Input method. Dispatches a key event to the page.

func (*Input) DispatchMouseEvent

func (d *Input) DispatchMouseEvent(ctx context.Context, args *cdpcmd.InputDispatchMouseEventArgs) (err error)

DispatchMouseEvent invokes the Input method. Dispatches a mouse event to the page.

func (*Input) DispatchTouchEvent

func (d *Input) DispatchTouchEvent(ctx context.Context, args *cdpcmd.InputDispatchTouchEventArgs) (err error)

DispatchTouchEvent invokes the Input method. Dispatches a touch event to the page.

func (*Input) EmulateTouchFromMouseEvent

func (d *Input) EmulateTouchFromMouseEvent(ctx context.Context, args *cdpcmd.InputEmulateTouchFromMouseEventArgs) (err error)

EmulateTouchFromMouseEvent invokes the Input method. Emulates touch event from the mouse event parameters.

func (*Input) SetIgnoreInputEvents

func (d *Input) SetIgnoreInputEvents(ctx context.Context, args *cdpcmd.InputSetIgnoreInputEventsArgs) (err error)

SetIgnoreInputEvents invokes the Input method. Ignores input events (useful while auditing page).

func (*Input) SynthesizePinchGesture

func (d *Input) SynthesizePinchGesture(ctx context.Context, args *cdpcmd.InputSynthesizePinchGestureArgs) (err error)

SynthesizePinchGesture invokes the Input method. Synthesizes a pinch gesture over a time period by issuing appropriate touch events.

func (*Input) SynthesizeScrollGesture

func (d *Input) SynthesizeScrollGesture(ctx context.Context, args *cdpcmd.InputSynthesizeScrollGestureArgs) (err error)

SynthesizeScrollGesture invokes the Input method. Synthesizes a scroll gesture over a time period by issuing appropriate touch events.

func (*Input) SynthesizeTapGesture

func (d *Input) SynthesizeTapGesture(ctx context.Context, args *cdpcmd.InputSynthesizeTapGestureArgs) (err error)

SynthesizeTapGesture invokes the Input method. Synthesizes a tap gesture over a time period by issuing appropriate touch events.

type Inspector

type Inspector struct {
	// contains filtered or unexported fields
}

The Inspector domain.

func NewInspector

func NewInspector(conn *rpcc.Conn) *Inspector

NewInspector returns the domain with the connection set to conn.

func (*Inspector) Detached

Detached creates the event client. Fired when remote debugging connection is about to be terminated. Contains detach reason.

func (*Inspector) Disable

func (d *Inspector) Disable(ctx context.Context) (err error)

Disable invokes the Inspector method. Disables inspector domain notifications.

func (*Inspector) Enable

func (d *Inspector) Enable(ctx context.Context) (err error)

Enable invokes the Inspector method. Enables inspector domain notifications.

func (*Inspector) TargetCrashed

TargetCrashed creates the event client. Fired when debugging target has crashed

type InspectorDetachedClient

type InspectorDetachedClient struct{ rpcc.Stream }

InspectorDetachedClient implements cdpevent.InspectorDetachedClient.

func (*InspectorDetachedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type InspectorTargetCrashedClient

type InspectorTargetCrashedClient struct{ rpcc.Stream }

InspectorTargetCrashedClient implements cdpevent.InspectorTargetCrashedClient.

func (*InspectorTargetCrashedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type LayerTree

type LayerTree struct {
	// contains filtered or unexported fields
}

The LayerTree domain.

func NewLayerTree

func NewLayerTree(conn *rpcc.Conn) *LayerTree

NewLayerTree returns the domain with the connection set to conn.

func (*LayerTree) CompositingReasons

CompositingReasons invokes the LayerTree method. Provides the reasons why the given layer was composited.

func (*LayerTree) Disable

func (d *LayerTree) Disable(ctx context.Context) (err error)

Disable invokes the LayerTree method. Disables compositing tree inspection.

func (*LayerTree) Enable

func (d *LayerTree) Enable(ctx context.Context) (err error)

Enable invokes the LayerTree method. Enables compositing tree inspection.

func (*LayerTree) LayerPainted

LayerPainted creates the event client.

func (*LayerTree) LayerTreeDidChange

func (d *LayerTree) LayerTreeDidChange(ctx context.Context) (cdpevent.LayerTreeDidChangeClient, error)

LayerTreeDidChange creates the event client.

func (*LayerTree) LoadSnapshot

LoadSnapshot invokes the LayerTree method. Returns the snapshot identifier.

func (*LayerTree) MakeSnapshot

MakeSnapshot invokes the LayerTree method. Returns the layer snapshot identifier.

func (*LayerTree) ProfileSnapshot

ProfileSnapshot invokes the LayerTree method.

func (*LayerTree) ReleaseSnapshot

func (d *LayerTree) ReleaseSnapshot(ctx context.Context, args *cdpcmd.LayerTreeReleaseSnapshotArgs) (err error)

ReleaseSnapshot invokes the LayerTree method. Releases layer snapshot captured by the back-end.

func (*LayerTree) ReplaySnapshot

ReplaySnapshot invokes the LayerTree method. Replays the layer snapshot and returns the resulting bitmap.

func (*LayerTree) SnapshotCommandLog

SnapshotCommandLog invokes the LayerTree method. Replays the layer snapshot and returns canvas log.

type LayerTreeDidChangeClient

type LayerTreeDidChangeClient struct{ rpcc.Stream }

LayerTreeDidChangeClient implements cdpevent.LayerTreeDidChangeClient.

func (*LayerTreeDidChangeClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type LayerTreeLayerPaintedClient

type LayerTreeLayerPaintedClient struct{ rpcc.Stream }

LayerTreeLayerPaintedClient implements cdpevent.LayerTreeLayerPaintedClient.

func (*LayerTreeLayerPaintedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Log

type Log struct {
	// contains filtered or unexported fields
}

The Log domain. Provides access to log entries.

func NewLog

func NewLog(conn *rpcc.Conn) *Log

NewLog returns the domain with the connection set to conn.

func (*Log) Clear

func (d *Log) Clear(ctx context.Context) (err error)

Clear invokes the Log method. Clears the log.

func (*Log) Disable

func (d *Log) Disable(ctx context.Context) (err error)

Disable invokes the Log method. Disables log domain, prevents further log entries from being reported to the client.

func (*Log) Enable

func (d *Log) Enable(ctx context.Context) (err error)

Enable invokes the Log method. Enables log domain, sends the entries collected so far to the client by means of the entryAdded notification.

func (*Log) EntryAdded

func (d *Log) EntryAdded(ctx context.Context) (cdpevent.LogEntryAddedClient, error)

EntryAdded creates the event client. Issued when new message was logged.

func (*Log) StartViolationsReport

func (d *Log) StartViolationsReport(ctx context.Context, args *cdpcmd.LogStartViolationsReportArgs) (err error)

StartViolationsReport invokes the Log method. start violation reporting.

func (*Log) StopViolationsReport

func (d *Log) StopViolationsReport(ctx context.Context) (err error)

StopViolationsReport invokes the Log method. Stop violation reporting.

type LogEntryAddedClient

type LogEntryAddedClient struct{ rpcc.Stream }

LogEntryAddedClient implements cdpevent.LogEntryAddedClient.

func (*LogEntryAddedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

The Memory domain.

func NewMemory

func NewMemory(conn *rpcc.Conn) *Memory

NewMemory returns the domain with the connection set to conn.

func (*Memory) GetDOMCounters

func (d *Memory) GetDOMCounters(ctx context.Context) (reply *cdpcmd.MemoryGetDOMCountersReply, err error)

GetDOMCounters invokes the Memory method.

func (*Memory) SetPressureNotificationsSuppressed

func (d *Memory) SetPressureNotificationsSuppressed(ctx context.Context, args *cdpcmd.MemorySetPressureNotificationsSuppressedArgs) (err error)

SetPressureNotificationsSuppressed invokes the Memory method. Enable/disable suppressing memory pressure notifications in all processes.

func (*Memory) SimulatePressureNotification

func (d *Memory) SimulatePressureNotification(ctx context.Context, args *cdpcmd.MemorySimulatePressureNotificationArgs) (err error)

SimulatePressureNotification invokes the Memory method. Simulate a memory pressure notification in all processes.

type Network

type Network struct {
	// contains filtered or unexported fields
}

The Network domain. Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.

func NewNetwork

func NewNetwork(conn *rpcc.Conn) *Network

NewNetwork returns the domain with the connection set to conn.

func (*Network) CanClearBrowserCache

func (d *Network) CanClearBrowserCache(ctx context.Context) (reply *cdpcmd.NetworkCanClearBrowserCacheReply, err error)

CanClearBrowserCache invokes the Network method. Tells whether clearing browser cache is supported.

func (*Network) CanClearBrowserCookies

func (d *Network) CanClearBrowserCookies(ctx context.Context) (reply *cdpcmd.NetworkCanClearBrowserCookiesReply, err error)

CanClearBrowserCookies invokes the Network method. Tells whether clearing browser cookies is supported.

func (*Network) CanEmulateNetworkConditions

func (d *Network) CanEmulateNetworkConditions(ctx context.Context) (reply *cdpcmd.NetworkCanEmulateNetworkConditionsReply, err error)

CanEmulateNetworkConditions invokes the Network method. Tells whether emulation of network conditions is supported.

func (*Network) ClearBrowserCache

func (d *Network) ClearBrowserCache(ctx context.Context) (err error)

ClearBrowserCache invokes the Network method. Clears browser cache.

func (*Network) ClearBrowserCookies

func (d *Network) ClearBrowserCookies(ctx context.Context) (err error)

ClearBrowserCookies invokes the Network method. Clears browser cookies.

func (*Network) ContinueInterceptedRequest

func (d *Network) ContinueInterceptedRequest(ctx context.Context, args *cdpcmd.NetworkContinueInterceptedRequestArgs) (err error)

ContinueInterceptedRequest invokes the Network method. Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId.

func (*Network) DataReceived

DataReceived creates the event client. Fired when data chunk was received over the network.

func (*Network) DeleteCookie

func (d *Network) DeleteCookie(ctx context.Context, args *cdpcmd.NetworkDeleteCookieArgs) (err error)

DeleteCookie invokes the Network method. Deletes browser cookie with given name, domain and path.

func (*Network) Disable

func (d *Network) Disable(ctx context.Context) (err error)

Disable invokes the Network method. Disables network tracking, prevents network events from being sent to the client.

func (*Network) EmulateNetworkConditions

func (d *Network) EmulateNetworkConditions(ctx context.Context, args *cdpcmd.NetworkEmulateNetworkConditionsArgs) (err error)

EmulateNetworkConditions invokes the Network method. Activates emulation of network conditions.

func (*Network) Enable

func (d *Network) Enable(ctx context.Context, args *cdpcmd.NetworkEnableArgs) (err error)

Enable invokes the Network method. Enables network tracking, network events will now be delivered to the client.

func (*Network) EnableRequestInterception

func (d *Network) EnableRequestInterception(ctx context.Context, args *cdpcmd.NetworkEnableRequestInterceptionArgs) (err error)

EnableRequestInterception invokes the Network method.

func (*Network) EventSourceMessageReceived

func (d *Network) EventSourceMessageReceived(ctx context.Context) (cdpevent.NetworkEventSourceMessageReceivedClient, error)

EventSourceMessageReceived creates the event client. Fired when EventSource message is received.

func (*Network) GetAllCookies

func (d *Network) GetAllCookies(ctx context.Context) (reply *cdpcmd.NetworkGetAllCookiesReply, err error)

GetAllCookies invokes the Network method. Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.

func (*Network) GetCertificate

func (d *Network) GetCertificate(ctx context.Context, args *cdpcmd.NetworkGetCertificateArgs) (reply *cdpcmd.NetworkGetCertificateReply, err error)

GetCertificate invokes the Network method. Returns the DER-encoded certificate.

func (*Network) GetCookies

func (d *Network) GetCookies(ctx context.Context, args *cdpcmd.NetworkGetCookiesArgs) (reply *cdpcmd.NetworkGetCookiesReply, err error)

GetCookies invokes the Network method. Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.

func (*Network) GetResponseBody

func (d *Network) GetResponseBody(ctx context.Context, args *cdpcmd.NetworkGetResponseBodyArgs) (reply *cdpcmd.NetworkGetResponseBodyReply, err error)

GetResponseBody invokes the Network method. Returns content served for the given request.

func (*Network) LoadingFailed

LoadingFailed creates the event client. Fired when HTTP request has failed to load.

func (*Network) LoadingFinished

LoadingFinished creates the event client. Fired when HTTP request has finished loading.

func (*Network) ReplayXHR

func (d *Network) ReplayXHR(ctx context.Context, args *cdpcmd.NetworkReplayXHRArgs) (err error)

ReplayXHR invokes the Network method. This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.

func (*Network) RequestIntercepted

func (d *Network) RequestIntercepted(ctx context.Context) (cdpevent.NetworkRequestInterceptedClient, error)

RequestIntercepted creates the event client. Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.

func (*Network) RequestServedFromCache

func (d *Network) RequestServedFromCache(ctx context.Context) (cdpevent.NetworkRequestServedFromCacheClient, error)

RequestServedFromCache creates the event client. Fired if request ended up loading from cache.

func (*Network) RequestWillBeSent

func (d *Network) RequestWillBeSent(ctx context.Context) (cdpevent.NetworkRequestWillBeSentClient, error)

RequestWillBeSent creates the event client. Fired when page is about to send HTTP request.

func (*Network) ResourceChangedPriority

func (d *Network) ResourceChangedPriority(ctx context.Context) (cdpevent.NetworkResourceChangedPriorityClient, error)

ResourceChangedPriority creates the event client. Fired when resource loading priority is changed

func (*Network) ResponseReceived

func (d *Network) ResponseReceived(ctx context.Context) (cdpevent.NetworkResponseReceivedClient, error)

ResponseReceived creates the event client. Fired when HTTP response is available.

func (*Network) SetBlockedURLs

func (d *Network) SetBlockedURLs(ctx context.Context, args *cdpcmd.NetworkSetBlockedURLsArgs) (err error)

SetBlockedURLs invokes the Network method. Blocks URLs from loading.

func (*Network) SetBypassServiceWorker

func (d *Network) SetBypassServiceWorker(ctx context.Context, args *cdpcmd.NetworkSetBypassServiceWorkerArgs) (err error)

SetBypassServiceWorker invokes the Network method. Toggles ignoring of service worker for each request.

func (*Network) SetCacheDisabled

func (d *Network) SetCacheDisabled(ctx context.Context, args *cdpcmd.NetworkSetCacheDisabledArgs) (err error)

SetCacheDisabled invokes the Network method. Toggles ignoring cache for each request. If true, cache will not be used.

func (*Network) SetCookie

func (d *Network) SetCookie(ctx context.Context, args *cdpcmd.NetworkSetCookieArgs) (reply *cdpcmd.NetworkSetCookieReply, err error)

SetCookie invokes the Network method. Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.

func (*Network) SetDataSizeLimitsForTest

func (d *Network) SetDataSizeLimitsForTest(ctx context.Context, args *cdpcmd.NetworkSetDataSizeLimitsForTestArgs) (err error)

SetDataSizeLimitsForTest invokes the Network method. For testing.

func (*Network) SetExtraHTTPHeaders

func (d *Network) SetExtraHTTPHeaders(ctx context.Context, args *cdpcmd.NetworkSetExtraHTTPHeadersArgs) (err error)

SetExtraHTTPHeaders invokes the Network method. Specifies whether to always send extra HTTP headers with the requests from this page.

func (*Network) SetUserAgentOverride

func (d *Network) SetUserAgentOverride(ctx context.Context, args *cdpcmd.NetworkSetUserAgentOverrideArgs) (err error)

SetUserAgentOverride invokes the Network method. Allows overriding user agent with the given string.

func (*Network) WebSocketClosed

WebSocketClosed creates the event client. Fired when WebSocket is closed.

func (*Network) WebSocketCreated

func (d *Network) WebSocketCreated(ctx context.Context) (cdpevent.NetworkWebSocketCreatedClient, error)

WebSocketCreated creates the event client. Fired upon WebSocket creation.

func (*Network) WebSocketFrameError

func (d *Network) WebSocketFrameError(ctx context.Context) (cdpevent.NetworkWebSocketFrameErrorClient, error)

WebSocketFrameError creates the event client. Fired when WebSocket frame error occurs.

func (*Network) WebSocketFrameReceived

func (d *Network) WebSocketFrameReceived(ctx context.Context) (cdpevent.NetworkWebSocketFrameReceivedClient, error)

WebSocketFrameReceived creates the event client. Fired when WebSocket frame is received.

func (*Network) WebSocketFrameSent

func (d *Network) WebSocketFrameSent(ctx context.Context) (cdpevent.NetworkWebSocketFrameSentClient, error)

WebSocketFrameSent creates the event client. Fired when WebSocket frame is sent.

func (*Network) WebSocketHandshakeResponseReceived

func (d *Network) WebSocketHandshakeResponseReceived(ctx context.Context) (cdpevent.NetworkWebSocketHandshakeResponseReceivedClient, error)

WebSocketHandshakeResponseReceived creates the event client. Fired when WebSocket handshake response becomes available.

func (*Network) WebSocketWillSendHandshakeRequest

func (d *Network) WebSocketWillSendHandshakeRequest(ctx context.Context) (cdpevent.NetworkWebSocketWillSendHandshakeRequestClient, error)

WebSocketWillSendHandshakeRequest creates the event client. Fired when WebSocket is about to initiate handshake.

type NetworkDataReceivedClient

type NetworkDataReceivedClient struct{ rpcc.Stream }

NetworkDataReceivedClient implements cdpevent.NetworkDataReceivedClient.

func (*NetworkDataReceivedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkEventSourceMessageReceivedClient

type NetworkEventSourceMessageReceivedClient struct{ rpcc.Stream }

NetworkEventSourceMessageReceivedClient implements cdpevent.NetworkEventSourceMessageReceivedClient.

func (*NetworkEventSourceMessageReceivedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkLoadingFailedClient

type NetworkLoadingFailedClient struct{ rpcc.Stream }

NetworkLoadingFailedClient implements cdpevent.NetworkLoadingFailedClient.

func (*NetworkLoadingFailedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkLoadingFinishedClient

type NetworkLoadingFinishedClient struct{ rpcc.Stream }

NetworkLoadingFinishedClient implements cdpevent.NetworkLoadingFinishedClient.

func (*NetworkLoadingFinishedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkRequestInterceptedClient

type NetworkRequestInterceptedClient struct{ rpcc.Stream }

NetworkRequestInterceptedClient implements cdpevent.NetworkRequestInterceptedClient.

func (*NetworkRequestInterceptedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkRequestServedFromCacheClient

type NetworkRequestServedFromCacheClient struct{ rpcc.Stream }

NetworkRequestServedFromCacheClient implements cdpevent.NetworkRequestServedFromCacheClient.

func (*NetworkRequestServedFromCacheClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkRequestWillBeSentClient

type NetworkRequestWillBeSentClient struct{ rpcc.Stream }

NetworkRequestWillBeSentClient implements cdpevent.NetworkRequestWillBeSentClient.

func (*NetworkRequestWillBeSentClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkResourceChangedPriorityClient

type NetworkResourceChangedPriorityClient struct{ rpcc.Stream }

NetworkResourceChangedPriorityClient implements cdpevent.NetworkResourceChangedPriorityClient.

func (*NetworkResourceChangedPriorityClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkResponseReceivedClient

type NetworkResponseReceivedClient struct{ rpcc.Stream }

NetworkResponseReceivedClient implements cdpevent.NetworkResponseReceivedClient.

func (*NetworkResponseReceivedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketClosedClient

type NetworkWebSocketClosedClient struct{ rpcc.Stream }

NetworkWebSocketClosedClient implements cdpevent.NetworkWebSocketClosedClient.

func (*NetworkWebSocketClosedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketCreatedClient

type NetworkWebSocketCreatedClient struct{ rpcc.Stream }

NetworkWebSocketCreatedClient implements cdpevent.NetworkWebSocketCreatedClient.

func (*NetworkWebSocketCreatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketFrameErrorClient

type NetworkWebSocketFrameErrorClient struct{ rpcc.Stream }

NetworkWebSocketFrameErrorClient implements cdpevent.NetworkWebSocketFrameErrorClient.

func (*NetworkWebSocketFrameErrorClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketFrameReceivedClient

type NetworkWebSocketFrameReceivedClient struct{ rpcc.Stream }

NetworkWebSocketFrameReceivedClient implements cdpevent.NetworkWebSocketFrameReceivedClient.

func (*NetworkWebSocketFrameReceivedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketFrameSentClient

type NetworkWebSocketFrameSentClient struct{ rpcc.Stream }

NetworkWebSocketFrameSentClient implements cdpevent.NetworkWebSocketFrameSentClient.

func (*NetworkWebSocketFrameSentClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketHandshakeResponseReceivedClient

type NetworkWebSocketHandshakeResponseReceivedClient struct{ rpcc.Stream }

NetworkWebSocketHandshakeResponseReceivedClient implements cdpevent.NetworkWebSocketHandshakeResponseReceivedClient.

func (*NetworkWebSocketHandshakeResponseReceivedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type NetworkWebSocketWillSendHandshakeRequestClient

type NetworkWebSocketWillSendHandshakeRequestClient struct{ rpcc.Stream }

NetworkWebSocketWillSendHandshakeRequestClient implements cdpevent.NetworkWebSocketWillSendHandshakeRequestClient.

func (*NetworkWebSocketWillSendHandshakeRequestClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Overlay

type Overlay struct {
	// contains filtered or unexported fields
}

The Overlay domain. This domain provides various functionality related to drawing atop the inspected page.

func NewOverlay

func NewOverlay(conn *rpcc.Conn) *Overlay

NewOverlay returns the domain with the connection set to conn.

func (*Overlay) Disable

func (d *Overlay) Disable(ctx context.Context) (err error)

Disable invokes the Overlay method. Disables domain notifications.

func (*Overlay) Enable

func (d *Overlay) Enable(ctx context.Context) (err error)

Enable invokes the Overlay method. Enables domain notifications.

func (*Overlay) GetHighlightObjectForTest

GetHighlightObjectForTest invokes the Overlay method. For testing.

func (*Overlay) HideHighlight

func (d *Overlay) HideHighlight(ctx context.Context) (err error)

HideHighlight invokes the Overlay method. Hides any highlight.

func (*Overlay) HighlightFrame

func (d *Overlay) HighlightFrame(ctx context.Context, args *cdpcmd.OverlayHighlightFrameArgs) (err error)

HighlightFrame invokes the Overlay method. Highlights owner element of the frame with given id.

func (*Overlay) HighlightNode

func (d *Overlay) HighlightNode(ctx context.Context, args *cdpcmd.OverlayHighlightNodeArgs) (err error)

HighlightNode invokes the Overlay method. Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

func (*Overlay) HighlightQuad

func (d *Overlay) HighlightQuad(ctx context.Context, args *cdpcmd.OverlayHighlightQuadArgs) (err error)

HighlightQuad invokes the Overlay method. Highlights given quad. Coordinates are absolute with respect to the main frame viewport.

func (*Overlay) HighlightRect

func (d *Overlay) HighlightRect(ctx context.Context, args *cdpcmd.OverlayHighlightRectArgs) (err error)

HighlightRect invokes the Overlay method. Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.

func (*Overlay) InspectNodeRequested

func (d *Overlay) InspectNodeRequested(ctx context.Context) (cdpevent.OverlayInspectNodeRequestedClient, error)

InspectNodeRequested creates the event client. Fired when the node should be inspected. This happens after call to setInspectMode or when user manually inspects an element.

func (*Overlay) NodeHighlightRequested

func (d *Overlay) NodeHighlightRequested(ctx context.Context) (cdpevent.OverlayNodeHighlightRequestedClient, error)

NodeHighlightRequested creates the event client. Fired when the node should be highlighted. This happens after call to setInspectMode.

func (*Overlay) SetInspectMode

func (d *Overlay) SetInspectMode(ctx context.Context, args *cdpcmd.OverlaySetInspectModeArgs) (err error)

SetInspectMode invokes the Overlay method. Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.

func (*Overlay) SetPausedInDebuggerMessage

func (d *Overlay) SetPausedInDebuggerMessage(ctx context.Context, args *cdpcmd.OverlaySetPausedInDebuggerMessageArgs) (err error)

SetPausedInDebuggerMessage invokes the Overlay method.

func (*Overlay) SetShowDebugBorders

func (d *Overlay) SetShowDebugBorders(ctx context.Context, args *cdpcmd.OverlaySetShowDebugBordersArgs) (err error)

SetShowDebugBorders invokes the Overlay method. Requests that backend shows debug borders on layers

func (*Overlay) SetShowFPSCounter

func (d *Overlay) SetShowFPSCounter(ctx context.Context, args *cdpcmd.OverlaySetShowFPSCounterArgs) (err error)

SetShowFPSCounter invokes the Overlay method. Requests that backend shows the FPS counter

func (*Overlay) SetShowPaintRects

func (d *Overlay) SetShowPaintRects(ctx context.Context, args *cdpcmd.OverlaySetShowPaintRectsArgs) (err error)

SetShowPaintRects invokes the Overlay method. Requests that backend shows paint rectangles

func (*Overlay) SetShowScrollBottleneckRects

func (d *Overlay) SetShowScrollBottleneckRects(ctx context.Context, args *cdpcmd.OverlaySetShowScrollBottleneckRectsArgs) (err error)

SetShowScrollBottleneckRects invokes the Overlay method. Requests that backend shows scroll bottleneck rects

func (*Overlay) SetShowViewportSizeOnResize

func (d *Overlay) SetShowViewportSizeOnResize(ctx context.Context, args *cdpcmd.OverlaySetShowViewportSizeOnResizeArgs) (err error)

SetShowViewportSizeOnResize invokes the Overlay method. Paints viewport size upon main frame resize.

func (*Overlay) SetSuspended

func (d *Overlay) SetSuspended(ctx context.Context, args *cdpcmd.OverlaySetSuspendedArgs) (err error)

SetSuspended invokes the Overlay method.

type OverlayInspectNodeRequestedClient

type OverlayInspectNodeRequestedClient struct{ rpcc.Stream }

OverlayInspectNodeRequestedClient implements cdpevent.OverlayInspectNodeRequestedClient.

func (*OverlayInspectNodeRequestedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type OverlayNodeHighlightRequestedClient

type OverlayNodeHighlightRequestedClient struct{ rpcc.Stream }

OverlayNodeHighlightRequestedClient implements cdpevent.OverlayNodeHighlightRequestedClient.

func (*OverlayNodeHighlightRequestedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Page

type Page struct {
	// contains filtered or unexported fields
}

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

func NewPage

func NewPage(conn *rpcc.Conn) *Page

NewPage returns the domain with the connection set to conn.

func (*Page) AddScriptToEvaluateOnLoad

func (d *Page) AddScriptToEvaluateOnLoad(ctx context.Context, args *cdpcmd.PageAddScriptToEvaluateOnLoadArgs) (reply *cdpcmd.PageAddScriptToEvaluateOnLoadReply, err error)

AddScriptToEvaluateOnLoad invokes the Page method.

func (*Page) CaptureScreenshot

func (d *Page) CaptureScreenshot(ctx context.Context, args *cdpcmd.PageCaptureScreenshotArgs) (reply *cdpcmd.PageCaptureScreenshotReply, err error)

CaptureScreenshot invokes the Page method. Capture page screenshot.

func (*Page) ClearDeviceMetricsOverride

func (d *Page) ClearDeviceMetricsOverride(ctx context.Context) (err error)

ClearDeviceMetricsOverride invokes the Page method. Clears the overridden device metrics.

func (*Page) ClearDeviceOrientationOverride

func (d *Page) ClearDeviceOrientationOverride(ctx context.Context) (err error)

ClearDeviceOrientationOverride invokes the Page method. Clears the overridden Device Orientation.

func (*Page) ClearGeolocationOverride

func (d *Page) ClearGeolocationOverride(ctx context.Context) (err error)

ClearGeolocationOverride invokes the Page method. Clears the overridden Geolocation Position and Error.

func (*Page) CreateIsolatedWorld

func (d *Page) CreateIsolatedWorld(ctx context.Context, args *cdpcmd.PageCreateIsolatedWorldArgs) (reply *cdpcmd.PageCreateIsolatedWorldReply, err error)

CreateIsolatedWorld invokes the Page method. Creates an isolated world for the given frame.

func (*Page) DOMContentEventFired

func (d *Page) DOMContentEventFired(ctx context.Context) (cdpevent.PageDOMContentEventFiredClient, error)

DOMContentEventFired creates the event client.

func (*Page) DeleteCookie

func (d *Page) DeleteCookie(ctx context.Context, args *cdpcmd.PageDeleteCookieArgs) (err error)

DeleteCookie invokes the Page method. Deletes browser cookie with given name, domain and path.

func (*Page) Disable

func (d *Page) Disable(ctx context.Context) (err error)

Disable invokes the Page method. Disables page domain notifications.

func (*Page) Enable

func (d *Page) Enable(ctx context.Context) (err error)

Enable invokes the Page method. Enables page domain notifications.

func (*Page) FrameAttached

func (d *Page) FrameAttached(ctx context.Context) (cdpevent.PageFrameAttachedClient, error)

FrameAttached creates the event client. Fired when frame has been attached to its parent.

func (*Page) FrameClearedScheduledNavigation

func (d *Page) FrameClearedScheduledNavigation(ctx context.Context) (cdpevent.PageFrameClearedScheduledNavigationClient, error)

FrameClearedScheduledNavigation creates the event client. Fired when frame no longer has a scheduled navigation.

func (*Page) FrameDetached

func (d *Page) FrameDetached(ctx context.Context) (cdpevent.PageFrameDetachedClient, error)

FrameDetached creates the event client. Fired when frame has been detached from its parent.

func (*Page) FrameNavigated

func (d *Page) FrameNavigated(ctx context.Context) (cdpevent.PageFrameNavigatedClient, error)

FrameNavigated creates the event client. Fired once navigation of the frame has completed. Frame is now associated with the new loader.

func (*Page) FrameResized

func (d *Page) FrameResized(ctx context.Context) (cdpevent.PageFrameResizedClient, error)

FrameResized creates the event client.

func (*Page) FrameScheduledNavigation

func (d *Page) FrameScheduledNavigation(ctx context.Context) (cdpevent.PageFrameScheduledNavigationClient, error)

FrameScheduledNavigation creates the event client. Fired when frame schedules a potential navigation.

func (*Page) FrameStartedLoading

func (d *Page) FrameStartedLoading(ctx context.Context) (cdpevent.PageFrameStartedLoadingClient, error)

FrameStartedLoading creates the event client. Fired when frame has started loading.

func (*Page) FrameStoppedLoading

func (d *Page) FrameStoppedLoading(ctx context.Context) (cdpevent.PageFrameStoppedLoadingClient, error)

FrameStoppedLoading creates the event client. Fired when frame has stopped loading.

func (*Page) GetAppManifest

func (d *Page) GetAppManifest(ctx context.Context) (reply *cdpcmd.PageGetAppManifestReply, err error)

GetAppManifest invokes the Page method.

func (*Page) GetCookies

func (d *Page) GetCookies(ctx context.Context) (reply *cdpcmd.PageGetCookiesReply, err error)

GetCookies invokes the Page method. Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.

func (*Page) GetLayoutMetrics

func (d *Page) GetLayoutMetrics(ctx context.Context) (reply *cdpcmd.PageGetLayoutMetricsReply, err error)

GetLayoutMetrics invokes the Page method. Returns metrics relating to the layouting of the page, such as viewport bounds/scale.

func (*Page) GetNavigationHistory

func (d *Page) GetNavigationHistory(ctx context.Context) (reply *cdpcmd.PageGetNavigationHistoryReply, err error)

GetNavigationHistory invokes the Page method. Returns navigation history for the current page.

func (*Page) GetResourceContent

func (d *Page) GetResourceContent(ctx context.Context, args *cdpcmd.PageGetResourceContentArgs) (reply *cdpcmd.PageGetResourceContentReply, err error)

GetResourceContent invokes the Page method. Returns content of the given resource.

func (*Page) GetResourceTree

func (d *Page) GetResourceTree(ctx context.Context) (reply *cdpcmd.PageGetResourceTreeReply, err error)

GetResourceTree invokes the Page method. Returns present frame / resource tree structure.

func (*Page) HandleJavaScriptDialog

func (d *Page) HandleJavaScriptDialog(ctx context.Context, args *cdpcmd.PageHandleJavaScriptDialogArgs) (err error)

HandleJavaScriptDialog invokes the Page method. Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

func (*Page) InterstitialHidden

func (d *Page) InterstitialHidden(ctx context.Context) (cdpevent.PageInterstitialHiddenClient, error)

InterstitialHidden creates the event client. Fired when interstitial page was hidden

func (*Page) InterstitialShown

func (d *Page) InterstitialShown(ctx context.Context) (cdpevent.PageInterstitialShownClient, error)

InterstitialShown creates the event client. Fired when interstitial page was shown

func (*Page) JavascriptDialogClosed

func (d *Page) JavascriptDialogClosed(ctx context.Context) (cdpevent.PageJavascriptDialogClosedClient, error)

JavascriptDialogClosed creates the event client. Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

func (*Page) JavascriptDialogOpening

func (d *Page) JavascriptDialogOpening(ctx context.Context) (cdpevent.PageJavascriptDialogOpeningClient, error)

JavascriptDialogOpening creates the event client. Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

func (*Page) LoadEventFired

func (d *Page) LoadEventFired(ctx context.Context) (cdpevent.PageLoadEventFiredClient, error)

LoadEventFired creates the event client.

func (*Page) Navigate

func (d *Page) Navigate(ctx context.Context, args *cdpcmd.PageNavigateArgs) (reply *cdpcmd.PageNavigateReply, err error)

Navigate invokes the Page method. Navigates current page to the given URL.

func (*Page) NavigateToHistoryEntry

func (d *Page) NavigateToHistoryEntry(ctx context.Context, args *cdpcmd.PageNavigateToHistoryEntryArgs) (err error)

NavigateToHistoryEntry invokes the Page method. Navigates current page to the given history entry.

func (*Page) NavigationRequested

func (d *Page) NavigationRequested(ctx context.Context) (cdpevent.PageNavigationRequestedClient, error)

NavigationRequested creates the event client. Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.

func (*Page) PrintToPDF

func (d *Page) PrintToPDF(ctx context.Context, args *cdpcmd.PagePrintToPDFArgs) (reply *cdpcmd.PagePrintToPDFReply, err error)

PrintToPDF invokes the Page method. Print page as PDF.

func (*Page) ProcessNavigation

func (d *Page) ProcessNavigation(ctx context.Context, args *cdpcmd.PageProcessNavigationArgs) (err error)

ProcessNavigation invokes the Page method. Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation.

func (*Page) Reload

func (d *Page) Reload(ctx context.Context, args *cdpcmd.PageReloadArgs) (err error)

Reload invokes the Page method. Reloads given page optionally ignoring the cache.

func (*Page) RemoveScriptToEvaluateOnLoad

func (d *Page) RemoveScriptToEvaluateOnLoad(ctx context.Context, args *cdpcmd.PageRemoveScriptToEvaluateOnLoadArgs) (err error)

RemoveScriptToEvaluateOnLoad invokes the Page method.

func (*Page) RequestAppBanner

func (d *Page) RequestAppBanner(ctx context.Context) (err error)

RequestAppBanner invokes the Page method.

func (*Page) ScreencastFrame

func (d *Page) ScreencastFrame(ctx context.Context) (cdpevent.PageScreencastFrameClient, error)

ScreencastFrame creates the event client. Compressed image data requested by the startScreencast.

func (*Page) ScreencastFrameAck

func (d *Page) ScreencastFrameAck(ctx context.Context, args *cdpcmd.PageScreencastFrameAckArgs) (err error)

ScreencastFrameAck invokes the Page method. Acknowledges that a screencast frame has been received by the frontend.

func (*Page) ScreencastVisibilityChanged

func (d *Page) ScreencastVisibilityChanged(ctx context.Context) (cdpevent.PageScreencastVisibilityChangedClient, error)

ScreencastVisibilityChanged creates the event client. Fired when the page with currently enabled screencast was shown or hidden .

func (*Page) SearchInResource

func (d *Page) SearchInResource(ctx context.Context, args *cdpcmd.PageSearchInResourceArgs) (reply *cdpcmd.PageSearchInResourceReply, err error)

SearchInResource invokes the Page method. Searches for given string in resource content.

func (*Page) SetAutoAttachToCreatedPages

func (d *Page) SetAutoAttachToCreatedPages(ctx context.Context, args *cdpcmd.PageSetAutoAttachToCreatedPagesArgs) (err error)

SetAutoAttachToCreatedPages invokes the Page method. Controls whether browser will open a new inspector window for connected pages.

func (*Page) SetControlNavigations

func (d *Page) SetControlNavigations(ctx context.Context, args *cdpcmd.PageSetControlNavigationsArgs) (err error)

SetControlNavigations invokes the Page method. Toggles navigation throttling which allows programatic control over navigation and redirect response.

func (*Page) SetDeviceMetricsOverride

func (d *Page) SetDeviceMetricsOverride(ctx context.Context, args *cdpcmd.PageSetDeviceMetricsOverrideArgs) (err error)

SetDeviceMetricsOverride invokes the Page method. 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).

func (*Page) SetDeviceOrientationOverride

func (d *Page) SetDeviceOrientationOverride(ctx context.Context, args *cdpcmd.PageSetDeviceOrientationOverrideArgs) (err error)

SetDeviceOrientationOverride invokes the Page method. Overrides the Device Orientation.

func (*Page) SetDocumentContent

func (d *Page) SetDocumentContent(ctx context.Context, args *cdpcmd.PageSetDocumentContentArgs) (err error)

SetDocumentContent invokes the Page method. Sets given markup as the document's HTML.

func (*Page) SetGeolocationOverride

func (d *Page) SetGeolocationOverride(ctx context.Context, args *cdpcmd.PageSetGeolocationOverrideArgs) (err error)

SetGeolocationOverride invokes the Page method. Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func (*Page) SetTouchEmulationEnabled

func (d *Page) SetTouchEmulationEnabled(ctx context.Context, args *cdpcmd.PageSetTouchEmulationEnabledArgs) (err error)

SetTouchEmulationEnabled invokes the Page method. Toggles mouse event-based touch event emulation.

func (*Page) StartScreencast

func (d *Page) StartScreencast(ctx context.Context, args *cdpcmd.PageStartScreencastArgs) (err error)

StartScreencast invokes the Page method. Starts sending each frame using the screencastFrame event.

func (*Page) StopLoading

func (d *Page) StopLoading(ctx context.Context) (err error)

StopLoading invokes the Page method. Force the page stop all navigations and pending resource fetches.

func (*Page) StopScreencast

func (d *Page) StopScreencast(ctx context.Context) (err error)

StopScreencast invokes the Page method. Stops sending each frame in the screencastFrame.

type PageDOMContentEventFiredClient

type PageDOMContentEventFiredClient struct{ rpcc.Stream }

PageDOMContentEventFiredClient implements cdpevent.PageDOMContentEventFiredClient.

func (*PageDOMContentEventFiredClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameAttachedClient

type PageFrameAttachedClient struct{ rpcc.Stream }

PageFrameAttachedClient implements cdpevent.PageFrameAttachedClient.

func (*PageFrameAttachedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameClearedScheduledNavigationClient

type PageFrameClearedScheduledNavigationClient struct{ rpcc.Stream }

PageFrameClearedScheduledNavigationClient implements cdpevent.PageFrameClearedScheduledNavigationClient.

func (*PageFrameClearedScheduledNavigationClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameDetachedClient

type PageFrameDetachedClient struct{ rpcc.Stream }

PageFrameDetachedClient implements cdpevent.PageFrameDetachedClient.

func (*PageFrameDetachedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameNavigatedClient

type PageFrameNavigatedClient struct{ rpcc.Stream }

PageFrameNavigatedClient implements cdpevent.PageFrameNavigatedClient.

func (*PageFrameNavigatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameResizedClient

type PageFrameResizedClient struct{ rpcc.Stream }

PageFrameResizedClient implements cdpevent.PageFrameResizedClient.

func (*PageFrameResizedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameScheduledNavigationClient

type PageFrameScheduledNavigationClient struct{ rpcc.Stream }

PageFrameScheduledNavigationClient implements cdpevent.PageFrameScheduledNavigationClient.

func (*PageFrameScheduledNavigationClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameStartedLoadingClient

type PageFrameStartedLoadingClient struct{ rpcc.Stream }

PageFrameStartedLoadingClient implements cdpevent.PageFrameStartedLoadingClient.

func (*PageFrameStartedLoadingClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageFrameStoppedLoadingClient

type PageFrameStoppedLoadingClient struct{ rpcc.Stream }

PageFrameStoppedLoadingClient implements cdpevent.PageFrameStoppedLoadingClient.

func (*PageFrameStoppedLoadingClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageInterstitialHiddenClient

type PageInterstitialHiddenClient struct{ rpcc.Stream }

PageInterstitialHiddenClient implements cdpevent.PageInterstitialHiddenClient.

func (*PageInterstitialHiddenClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageInterstitialShownClient

type PageInterstitialShownClient struct{ rpcc.Stream }

PageInterstitialShownClient implements cdpevent.PageInterstitialShownClient.

func (*PageInterstitialShownClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageJavascriptDialogClosedClient

type PageJavascriptDialogClosedClient struct{ rpcc.Stream }

PageJavascriptDialogClosedClient implements cdpevent.PageJavascriptDialogClosedClient.

func (*PageJavascriptDialogClosedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageJavascriptDialogOpeningClient

type PageJavascriptDialogOpeningClient struct{ rpcc.Stream }

PageJavascriptDialogOpeningClient implements cdpevent.PageJavascriptDialogOpeningClient.

func (*PageJavascriptDialogOpeningClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageLoadEventFiredClient

type PageLoadEventFiredClient struct{ rpcc.Stream }

PageLoadEventFiredClient implements cdpevent.PageLoadEventFiredClient.

func (*PageLoadEventFiredClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageNavigationRequestedClient struct{ rpcc.Stream }

PageNavigationRequestedClient implements cdpevent.PageNavigationRequestedClient.

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageScreencastFrameClient

type PageScreencastFrameClient struct{ rpcc.Stream }

PageScreencastFrameClient implements cdpevent.PageScreencastFrameClient.

func (*PageScreencastFrameClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type PageScreencastVisibilityChangedClient

type PageScreencastVisibilityChangedClient struct{ rpcc.Stream }

PageScreencastVisibilityChangedClient implements cdpevent.PageScreencastVisibilityChangedClient.

func (*PageScreencastVisibilityChangedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Profiler

type Profiler struct {
	// contains filtered or unexported fields
}

The Profiler domain.

func NewProfiler

func NewProfiler(conn *rpcc.Conn) *Profiler

NewProfiler returns the domain with the connection set to conn.

func (*Profiler) ConsoleProfileFinished

func (d *Profiler) ConsoleProfileFinished(ctx context.Context) (cdpevent.ProfilerConsoleProfileFinishedClient, error)

ConsoleProfileFinished creates the event client.

func (*Profiler) ConsoleProfileStarted

func (d *Profiler) ConsoleProfileStarted(ctx context.Context) (cdpevent.ProfilerConsoleProfileStartedClient, error)

ConsoleProfileStarted creates the event client. Sent when new profile recording is started using console.profile() call.

func (*Profiler) Disable

func (d *Profiler) Disable(ctx context.Context) (err error)

Disable invokes the Profiler method.

func (*Profiler) Enable

func (d *Profiler) Enable(ctx context.Context) (err error)

Enable invokes the Profiler method.

func (*Profiler) GetBestEffortCoverage

func (d *Profiler) GetBestEffortCoverage(ctx context.Context) (reply *cdpcmd.ProfilerGetBestEffortCoverageReply, err error)

GetBestEffortCoverage invokes the Profiler method. Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

func (*Profiler) SetSamplingInterval

func (d *Profiler) SetSamplingInterval(ctx context.Context, args *cdpcmd.ProfilerSetSamplingIntervalArgs) (err error)

SetSamplingInterval invokes the Profiler method. Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

func (*Profiler) Start

func (d *Profiler) Start(ctx context.Context) (err error)

Start invokes the Profiler method.

func (*Profiler) StartPreciseCoverage

func (d *Profiler) StartPreciseCoverage(ctx context.Context, args *cdpcmd.ProfilerStartPreciseCoverageArgs) (err error)

StartPreciseCoverage invokes the Profiler method. Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

func (*Profiler) Stop

func (d *Profiler) Stop(ctx context.Context) (reply *cdpcmd.ProfilerStopReply, err error)

Stop invokes the Profiler method.

func (*Profiler) StopPreciseCoverage

func (d *Profiler) StopPreciseCoverage(ctx context.Context) (err error)

StopPreciseCoverage invokes the Profiler method. Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

func (*Profiler) TakePreciseCoverage

func (d *Profiler) TakePreciseCoverage(ctx context.Context) (reply *cdpcmd.ProfilerTakePreciseCoverageReply, err error)

TakePreciseCoverage invokes the Profiler method. Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

type ProfilerConsoleProfileFinishedClient

type ProfilerConsoleProfileFinishedClient struct{ rpcc.Stream }

ProfilerConsoleProfileFinishedClient implements cdpevent.ProfilerConsoleProfileFinishedClient.

func (*ProfilerConsoleProfileFinishedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ProfilerConsoleProfileStartedClient

type ProfilerConsoleProfileStartedClient struct{ rpcc.Stream }

ProfilerConsoleProfileStartedClient implements cdpevent.ProfilerConsoleProfileStartedClient.

func (*ProfilerConsoleProfileStartedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

The Runtime domain. Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.

func NewRuntime

func NewRuntime(conn *rpcc.Conn) *Runtime

NewRuntime returns the domain with the connection set to conn.

func (*Runtime) AwaitPromise

func (d *Runtime) AwaitPromise(ctx context.Context, args *cdpcmd.RuntimeAwaitPromiseArgs) (reply *cdpcmd.RuntimeAwaitPromiseReply, err error)

AwaitPromise invokes the Runtime method. Add handler to promise with given promise object id.

func (*Runtime) CallFunctionOn

func (d *Runtime) CallFunctionOn(ctx context.Context, args *cdpcmd.RuntimeCallFunctionOnArgs) (reply *cdpcmd.RuntimeCallFunctionOnReply, err error)

CallFunctionOn invokes the Runtime method. Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

func (*Runtime) CompileScript

func (d *Runtime) CompileScript(ctx context.Context, args *cdpcmd.RuntimeCompileScriptArgs) (reply *cdpcmd.RuntimeCompileScriptReply, err error)

CompileScript invokes the Runtime method. Compiles expression.

func (*Runtime) ConsoleAPICalled

func (d *Runtime) ConsoleAPICalled(ctx context.Context) (cdpevent.RuntimeConsoleAPICalledClient, error)

ConsoleAPICalled creates the event client. Issued when console API was called.

func (*Runtime) Disable

func (d *Runtime) Disable(ctx context.Context) (err error)

Disable invokes the Runtime method. Disables reporting of execution contexts creation.

func (*Runtime) DiscardConsoleEntries

func (d *Runtime) DiscardConsoleEntries(ctx context.Context) (err error)

DiscardConsoleEntries invokes the Runtime method. Discards collected exceptions and console API calls.

func (*Runtime) Enable

func (d *Runtime) Enable(ctx context.Context) (err error)

Enable invokes the Runtime method. Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.

func (*Runtime) Evaluate

func (d *Runtime) Evaluate(ctx context.Context, args *cdpcmd.RuntimeEvaluateArgs) (reply *cdpcmd.RuntimeEvaluateReply, err error)

Evaluate invokes the Runtime method. Evaluates expression on global object.

func (*Runtime) ExceptionRevoked

func (d *Runtime) ExceptionRevoked(ctx context.Context) (cdpevent.RuntimeExceptionRevokedClient, error)

ExceptionRevoked creates the event client. Issued when unhandled exception was revoked.

func (*Runtime) ExceptionThrown

ExceptionThrown creates the event client. Issued when exception was thrown and unhandled.

func (*Runtime) ExecutionContextCreated

func (d *Runtime) ExecutionContextCreated(ctx context.Context) (cdpevent.RuntimeExecutionContextCreatedClient, error)

ExecutionContextCreated creates the event client. Issued when new execution context is created.

func (*Runtime) ExecutionContextDestroyed

func (d *Runtime) ExecutionContextDestroyed(ctx context.Context) (cdpevent.RuntimeExecutionContextDestroyedClient, error)

ExecutionContextDestroyed creates the event client. Issued when execution context is destroyed.

func (*Runtime) ExecutionContextsCleared

func (d *Runtime) ExecutionContextsCleared(ctx context.Context) (cdpevent.RuntimeExecutionContextsClearedClient, error)

ExecutionContextsCleared creates the event client. Issued when all executionContexts were cleared in browser

func (*Runtime) GetProperties

func (d *Runtime) GetProperties(ctx context.Context, args *cdpcmd.RuntimeGetPropertiesArgs) (reply *cdpcmd.RuntimeGetPropertiesReply, err error)

GetProperties invokes the Runtime method. Returns properties of a given object. Object group of the result is inherited from the target object.

func (*Runtime) InspectRequested

func (d *Runtime) InspectRequested(ctx context.Context) (cdpevent.RuntimeInspectRequestedClient, error)

InspectRequested creates the event client. Issued when object should be inspected (for example, as a result of inspect() command line API call).

func (*Runtime) ReleaseObject

func (d *Runtime) ReleaseObject(ctx context.Context, args *cdpcmd.RuntimeReleaseObjectArgs) (err error)

ReleaseObject invokes the Runtime method. Releases remote object with given id.

func (*Runtime) ReleaseObjectGroup

func (d *Runtime) ReleaseObjectGroup(ctx context.Context, args *cdpcmd.RuntimeReleaseObjectGroupArgs) (err error)

ReleaseObjectGroup invokes the Runtime method. Releases all remote objects that belong to a given group.

func (*Runtime) RunIfWaitingForDebugger

func (d *Runtime) RunIfWaitingForDebugger(ctx context.Context) (err error)

RunIfWaitingForDebugger invokes the Runtime method. Tells inspected instance to run if it was waiting for debugger to attach.

func (*Runtime) RunScript

func (d *Runtime) RunScript(ctx context.Context, args *cdpcmd.RuntimeRunScriptArgs) (reply *cdpcmd.RuntimeRunScriptReply, err error)

RunScript invokes the Runtime method. Runs script with given id in a given context.

func (*Runtime) SetCustomObjectFormatterEnabled

func (d *Runtime) SetCustomObjectFormatterEnabled(ctx context.Context, args *cdpcmd.RuntimeSetCustomObjectFormatterEnabledArgs) (err error)

SetCustomObjectFormatterEnabled invokes the Runtime method.

type RuntimeConsoleAPICalledClient

type RuntimeConsoleAPICalledClient struct{ rpcc.Stream }

RuntimeConsoleAPICalledClient implements cdpevent.RuntimeConsoleAPICalledClient.

func (*RuntimeConsoleAPICalledClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeExceptionRevokedClient

type RuntimeExceptionRevokedClient struct{ rpcc.Stream }

RuntimeExceptionRevokedClient implements cdpevent.RuntimeExceptionRevokedClient.

func (*RuntimeExceptionRevokedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeExceptionThrownClient

type RuntimeExceptionThrownClient struct{ rpcc.Stream }

RuntimeExceptionThrownClient implements cdpevent.RuntimeExceptionThrownClient.

func (*RuntimeExceptionThrownClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeExecutionContextCreatedClient

type RuntimeExecutionContextCreatedClient struct{ rpcc.Stream }

RuntimeExecutionContextCreatedClient implements cdpevent.RuntimeExecutionContextCreatedClient.

func (*RuntimeExecutionContextCreatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeExecutionContextDestroyedClient

type RuntimeExecutionContextDestroyedClient struct{ rpcc.Stream }

RuntimeExecutionContextDestroyedClient implements cdpevent.RuntimeExecutionContextDestroyedClient.

func (*RuntimeExecutionContextDestroyedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeExecutionContextsClearedClient

type RuntimeExecutionContextsClearedClient struct{ rpcc.Stream }

RuntimeExecutionContextsClearedClient implements cdpevent.RuntimeExecutionContextsClearedClient.

func (*RuntimeExecutionContextsClearedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type RuntimeInspectRequestedClient

type RuntimeInspectRequestedClient struct{ rpcc.Stream }

RuntimeInspectRequestedClient implements cdpevent.RuntimeInspectRequestedClient.

func (*RuntimeInspectRequestedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

The Schema domain. Provides information about the protocol schema.

func NewSchema

func NewSchema(conn *rpcc.Conn) *Schema

NewSchema returns the domain with the connection set to conn.

func (*Schema) GetDomains

func (d *Schema) GetDomains(ctx context.Context) (reply *cdpcmd.SchemaGetDomainsReply, err error)

GetDomains invokes the Schema method. Returns supported domains.

type Security

type Security struct {
	// contains filtered or unexported fields
}

The Security domain. Security

func NewSecurity

func NewSecurity(conn *rpcc.Conn) *Security

NewSecurity returns the domain with the connection set to conn.

func (*Security) CertificateError

CertificateError creates the event client. There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally.

func (*Security) Disable

func (d *Security) Disable(ctx context.Context) (err error)

Disable invokes the Security method. Disables tracking security state changes.

func (*Security) Enable

func (d *Security) Enable(ctx context.Context) (err error)

Enable invokes the Security method. Enables tracking security state changes.

func (*Security) HandleCertificateError

func (d *Security) HandleCertificateError(ctx context.Context, args *cdpcmd.SecurityHandleCertificateErrorArgs) (err error)

HandleCertificateError invokes the Security method. Handles a certificate error that fired a certificateError event.

func (*Security) SecurityStateChanged

func (d *Security) SecurityStateChanged(ctx context.Context) (cdpevent.SecurityStateChangedClient, error)

SecurityStateChanged creates the event client. The security state of the page changed.

func (*Security) SetOverrideCertificateErrors

func (d *Security) SetOverrideCertificateErrors(ctx context.Context, args *cdpcmd.SecuritySetOverrideCertificateErrorsArgs) (err error)

SetOverrideCertificateErrors invokes the Security method. Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.

func (*Security) ShowCertificateViewer

func (d *Security) ShowCertificateViewer(ctx context.Context) (err error)

ShowCertificateViewer invokes the Security method. Displays native dialog with the certificate details.

type SecurityCertificateErrorClient

type SecurityCertificateErrorClient struct{ rpcc.Stream }

SecurityCertificateErrorClient implements cdpevent.SecurityCertificateErrorClient.

func (*SecurityCertificateErrorClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type SecurityStateChangedClient

type SecurityStateChangedClient struct{ rpcc.Stream }

SecurityStateChangedClient implements cdpevent.SecurityStateChangedClient.

func (*SecurityStateChangedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ServiceWorker

type ServiceWorker struct {
	// contains filtered or unexported fields
}

The ServiceWorker domain.

func NewServiceWorker

func NewServiceWorker(conn *rpcc.Conn) *ServiceWorker

NewServiceWorker returns the domain with the connection set to conn.

func (*ServiceWorker) DeliverPushMessage

func (d *ServiceWorker) DeliverPushMessage(ctx context.Context, args *cdpcmd.ServiceWorkerDeliverPushMessageArgs) (err error)

DeliverPushMessage invokes the ServiceWorker method.

func (*ServiceWorker) Disable

func (d *ServiceWorker) Disable(ctx context.Context) (err error)

Disable invokes the ServiceWorker method.

func (*ServiceWorker) DispatchSyncEvent

func (d *ServiceWorker) DispatchSyncEvent(ctx context.Context, args *cdpcmd.ServiceWorkerDispatchSyncEventArgs) (err error)

DispatchSyncEvent invokes the ServiceWorker method.

func (*ServiceWorker) Enable

func (d *ServiceWorker) Enable(ctx context.Context) (err error)

Enable invokes the ServiceWorker method.

func (*ServiceWorker) InspectWorker

func (d *ServiceWorker) InspectWorker(ctx context.Context, args *cdpcmd.ServiceWorkerInspectWorkerArgs) (err error)

InspectWorker invokes the ServiceWorker method.

func (*ServiceWorker) SetForceUpdateOnPageLoad

func (d *ServiceWorker) SetForceUpdateOnPageLoad(ctx context.Context, args *cdpcmd.ServiceWorkerSetForceUpdateOnPageLoadArgs) (err error)

SetForceUpdateOnPageLoad invokes the ServiceWorker method.

func (*ServiceWorker) SkipWaiting

func (d *ServiceWorker) SkipWaiting(ctx context.Context, args *cdpcmd.ServiceWorkerSkipWaitingArgs) (err error)

SkipWaiting invokes the ServiceWorker method.

func (*ServiceWorker) StartWorker

func (d *ServiceWorker) StartWorker(ctx context.Context, args *cdpcmd.ServiceWorkerStartWorkerArgs) (err error)

StartWorker invokes the ServiceWorker method.

func (*ServiceWorker) StopWorker

func (d *ServiceWorker) StopWorker(ctx context.Context, args *cdpcmd.ServiceWorkerStopWorkerArgs) (err error)

StopWorker invokes the ServiceWorker method.

func (*ServiceWorker) Unregister

func (d *ServiceWorker) Unregister(ctx context.Context, args *cdpcmd.ServiceWorkerUnregisterArgs) (err error)

Unregister invokes the ServiceWorker method.

func (*ServiceWorker) UpdateRegistration

func (d *ServiceWorker) UpdateRegistration(ctx context.Context, args *cdpcmd.ServiceWorkerUpdateRegistrationArgs) (err error)

UpdateRegistration invokes the ServiceWorker method.

func (*ServiceWorker) WorkerErrorReported

WorkerErrorReported creates the event client.

func (*ServiceWorker) WorkerRegistrationUpdated

WorkerRegistrationUpdated creates the event client.

func (*ServiceWorker) WorkerVersionUpdated

WorkerVersionUpdated creates the event client.

type ServiceWorkerWorkerErrorReportedClient

type ServiceWorkerWorkerErrorReportedClient struct{ rpcc.Stream }

ServiceWorkerWorkerErrorReportedClient implements cdpevent.ServiceWorkerWorkerErrorReportedClient.

func (*ServiceWorkerWorkerErrorReportedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ServiceWorkerWorkerRegistrationUpdatedClient

type ServiceWorkerWorkerRegistrationUpdatedClient struct{ rpcc.Stream }

ServiceWorkerWorkerRegistrationUpdatedClient implements cdpevent.ServiceWorkerWorkerRegistrationUpdatedClient.

func (*ServiceWorkerWorkerRegistrationUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type ServiceWorkerWorkerVersionUpdatedClient

type ServiceWorkerWorkerVersionUpdatedClient struct{ rpcc.Stream }

ServiceWorkerWorkerVersionUpdatedClient implements cdpevent.ServiceWorkerWorkerVersionUpdatedClient.

func (*ServiceWorkerWorkerVersionUpdatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

The Storage domain.

func NewStorage

func NewStorage(conn *rpcc.Conn) *Storage

NewStorage returns the domain with the connection set to conn.

func (*Storage) ClearDataForOrigin

func (d *Storage) ClearDataForOrigin(ctx context.Context, args *cdpcmd.StorageClearDataForOriginArgs) (err error)

ClearDataForOrigin invokes the Storage method. Clears storage for origin.

func (*Storage) GetUsageAndQuota

func (d *Storage) GetUsageAndQuota(ctx context.Context, args *cdpcmd.StorageGetUsageAndQuotaArgs) (reply *cdpcmd.StorageGetUsageAndQuotaReply, err error)

GetUsageAndQuota invokes the Storage method. Returns usage and quota in bytes.

type SystemInfo

type SystemInfo struct {
	// contains filtered or unexported fields
}

The SystemInfo domain. The SystemInfo domain defines methods and events for querying low-level system information.

func NewSystemInfo

func NewSystemInfo(conn *rpcc.Conn) *SystemInfo

NewSystemInfo returns the domain with the connection set to conn.

func (*SystemInfo) GetInfo

func (d *SystemInfo) GetInfo(ctx context.Context) (reply *cdpcmd.SystemInfoGetInfoReply, err error)

GetInfo invokes the SystemInfo method. Returns information about the system.

type Target

type Target struct {
	// contains filtered or unexported fields
}

The Target domain. Supports additional targets discovery and allows to attach to them.

func NewTarget

func NewTarget(conn *rpcc.Conn) *Target

NewTarget returns the domain with the connection set to conn.

func (*Target) ActivateTarget

func (d *Target) ActivateTarget(ctx context.Context, args *cdpcmd.TargetActivateTargetArgs) (err error)

ActivateTarget invokes the Target method. Activates (focuses) the target.

func (*Target) AttachToTarget

func (d *Target) AttachToTarget(ctx context.Context, args *cdpcmd.TargetAttachToTargetArgs) (reply *cdpcmd.TargetAttachToTargetReply, err error)

AttachToTarget invokes the Target method. Attaches to the target with given id.

func (*Target) AttachedToTarget

func (d *Target) AttachedToTarget(ctx context.Context) (cdpevent.TargetAttachedToTargetClient, error)

AttachedToTarget creates the event client. Issued when attached to target because of auto-attach or attachToTarget command.

func (*Target) CloseTarget

func (d *Target) CloseTarget(ctx context.Context, args *cdpcmd.TargetCloseTargetArgs) (reply *cdpcmd.TargetCloseTargetReply, err error)

CloseTarget invokes the Target method. Closes the target. If the target is a page that gets closed too.

func (*Target) CreateBrowserContext

func (d *Target) CreateBrowserContext(ctx context.Context) (reply *cdpcmd.TargetCreateBrowserContextReply, err error)

CreateBrowserContext invokes the Target method. Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.

func (*Target) CreateTarget

func (d *Target) CreateTarget(ctx context.Context, args *cdpcmd.TargetCreateTargetArgs) (reply *cdpcmd.TargetCreateTargetReply, err error)

CreateTarget invokes the Target method. Creates a new page.

func (*Target) DetachFromTarget

func (d *Target) DetachFromTarget(ctx context.Context, args *cdpcmd.TargetDetachFromTargetArgs) (err error)

DetachFromTarget invokes the Target method. Detaches from the target with given id.

func (*Target) DetachedFromTarget

func (d *Target) DetachedFromTarget(ctx context.Context) (cdpevent.TargetDetachedFromTargetClient, error)

DetachedFromTarget creates the event client. Issued when detached from target for any reason (including detachFromTarget command).

func (*Target) DisposeBrowserContext

func (d *Target) DisposeBrowserContext(ctx context.Context, args *cdpcmd.TargetDisposeBrowserContextArgs) (reply *cdpcmd.TargetDisposeBrowserContextReply, err error)

DisposeBrowserContext invokes the Target method. Deletes a BrowserContext, will fail of any open page uses it.

func (*Target) GetTargetInfo

func (d *Target) GetTargetInfo(ctx context.Context, args *cdpcmd.TargetGetTargetInfoArgs) (reply *cdpcmd.TargetGetTargetInfoReply, err error)

GetTargetInfo invokes the Target method. Returns information about a target.

func (*Target) GetTargets

func (d *Target) GetTargets(ctx context.Context) (reply *cdpcmd.TargetGetTargetsReply, err error)

GetTargets invokes the Target method. Retrieves a list of available targets.

func (*Target) ReceivedMessageFromTarget

func (d *Target) ReceivedMessageFromTarget(ctx context.Context) (cdpevent.TargetReceivedMessageFromTargetClient, error)

ReceivedMessageFromTarget creates the event client. Notifies about new protocol message from attached target.

func (*Target) SendMessageToTarget

func (d *Target) SendMessageToTarget(ctx context.Context, args *cdpcmd.TargetSendMessageToTargetArgs) (err error)

SendMessageToTarget invokes the Target method. Sends protocol message to the target with given id.

func (*Target) SetAttachToFrames

func (d *Target) SetAttachToFrames(ctx context.Context, args *cdpcmd.TargetSetAttachToFramesArgs) (err error)

SetAttachToFrames invokes the Target method.

func (*Target) SetAutoAttach

func (d *Target) SetAutoAttach(ctx context.Context, args *cdpcmd.TargetSetAutoAttachArgs) (err error)

SetAutoAttach invokes the Target method. Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.

func (*Target) SetDiscoverTargets

func (d *Target) SetDiscoverTargets(ctx context.Context, args *cdpcmd.TargetSetDiscoverTargetsArgs) (err error)

SetDiscoverTargets invokes the Target method. Controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events.

func (*Target) SetRemoteLocations

func (d *Target) SetRemoteLocations(ctx context.Context, args *cdpcmd.TargetSetRemoteLocationsArgs) (err error)

SetRemoteLocations invokes the Target method. Enables target discovery for the specified locations, when setDiscoverTargets was set to true.

func (*Target) TargetCreated

func (d *Target) TargetCreated(ctx context.Context) (cdpevent.TargetCreatedClient, error)

TargetCreated creates the event client. Issued when a possible inspection target is created.

func (*Target) TargetDestroyed

func (d *Target) TargetDestroyed(ctx context.Context) (cdpevent.TargetDestroyedClient, error)

TargetDestroyed creates the event client. Issued when a target is destroyed.

func (*Target) TargetInfoChanged

func (d *Target) TargetInfoChanged(ctx context.Context) (cdpevent.TargetInfoChangedClient, error)

TargetInfoChanged creates the event client. Issued when some information about a target has changed. This only happens between targetCreated and targetDestroyed.

type TargetAttachedToTargetClient

type TargetAttachedToTargetClient struct{ rpcc.Stream }

TargetAttachedToTargetClient implements cdpevent.TargetAttachedToTargetClient.

func (*TargetAttachedToTargetClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TargetCreatedClient

type TargetCreatedClient struct{ rpcc.Stream }

TargetCreatedClient implements cdpevent.TargetCreatedClient.

func (*TargetCreatedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TargetDestroyedClient

type TargetDestroyedClient struct{ rpcc.Stream }

TargetDestroyedClient implements cdpevent.TargetDestroyedClient.

func (*TargetDestroyedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TargetDetachedFromTargetClient

type TargetDetachedFromTargetClient struct{ rpcc.Stream }

TargetDetachedFromTargetClient implements cdpevent.TargetDetachedFromTargetClient.

func (*TargetDetachedFromTargetClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TargetInfoChangedClient

type TargetInfoChangedClient struct{ rpcc.Stream }

TargetInfoChangedClient implements cdpevent.TargetInfoChangedClient.

func (*TargetInfoChangedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TargetReceivedMessageFromTargetClient

type TargetReceivedMessageFromTargetClient struct{ rpcc.Stream }

TargetReceivedMessageFromTargetClient implements cdpevent.TargetReceivedMessageFromTargetClient.

func (*TargetReceivedMessageFromTargetClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Tethering

type Tethering struct {
	// contains filtered or unexported fields
}

The Tethering domain. The Tethering domain defines methods and events for browser port binding.

func NewTethering

func NewTethering(conn *rpcc.Conn) *Tethering

NewTethering returns the domain with the connection set to conn.

func (*Tethering) Accepted

Accepted creates the event client. Informs that port was successfully bound and got a specified connection id.

func (*Tethering) Bind

func (d *Tethering) Bind(ctx context.Context, args *cdpcmd.TetheringBindArgs) (err error)

Bind invokes the Tethering method. Request browser port binding.

func (*Tethering) Unbind

func (d *Tethering) Unbind(ctx context.Context, args *cdpcmd.TetheringUnbindArgs) (err error)

Unbind invokes the Tethering method. Request browser port unbinding.

type TetheringAcceptedClient

type TetheringAcceptedClient struct{ rpcc.Stream }

TetheringAcceptedClient implements cdpevent.TetheringAcceptedClient.

func (*TetheringAcceptedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type Tracing

type Tracing struct {
	// contains filtered or unexported fields
}

The Tracing domain.

func NewTracing

func NewTracing(conn *rpcc.Conn) *Tracing

NewTracing returns the domain with the connection set to conn.

func (*Tracing) BufferUsage

BufferUsage creates the event client.

func (*Tracing) DataCollected

DataCollected creates the event client. Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.

func (*Tracing) End

func (d *Tracing) End(ctx context.Context) (err error)

End invokes the Tracing method. Stop trace events collection.

func (*Tracing) GetCategories

func (d *Tracing) GetCategories(ctx context.Context) (reply *cdpcmd.TracingGetCategoriesReply, err error)

GetCategories invokes the Tracing method. Gets supported tracing categories.

func (*Tracing) RecordClockSyncMarker

func (d *Tracing) RecordClockSyncMarker(ctx context.Context, args *cdpcmd.TracingRecordClockSyncMarkerArgs) (err error)

RecordClockSyncMarker invokes the Tracing method. Record a clock sync marker in the trace.

func (*Tracing) RequestMemoryDump

func (d *Tracing) RequestMemoryDump(ctx context.Context) (reply *cdpcmd.TracingRequestMemoryDumpReply, err error)

RequestMemoryDump invokes the Tracing method. Request a global memory dump.

func (*Tracing) Start

func (d *Tracing) Start(ctx context.Context, args *cdpcmd.TracingStartArgs) (err error)

Start invokes the Tracing method. Start trace events collection.

func (*Tracing) TracingComplete

func (d *Tracing) TracingComplete(ctx context.Context) (cdpevent.TracingCompleteClient, error)

TracingComplete creates the event client. Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

type TracingBufferUsageClient

type TracingBufferUsageClient struct{ rpcc.Stream }

TracingBufferUsageClient implements cdpevent.TracingBufferUsageClient.

func (*TracingBufferUsageClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TracingCompleteClient

type TracingCompleteClient struct{ rpcc.Stream }

TracingCompleteClient implements cdpevent.TracingCompleteClient.

func (*TracingCompleteClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

type TracingDataCollectedClient

type TracingDataCollectedClient struct{ rpcc.Stream }

TracingDataCollectedClient implements cdpevent.TracingDataCollectedClient.

func (*TracingDataCollectedClient) Recv

Recv calls RecvMsg on rpcc.Stream, blocks until the event is triggered, context canceled or connection closed.

Jump to

Keyboard shortcuts

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