blob: a390000fca0e39e93b79eb1dfac34ea3ab9a90c2 [file] [log] [blame]
// Code generated by cdpgen. DO NOT EDIT.
package cdp
import (
"context"
"github.com/mafredri/cdp/protocol/accessibility"
"github.com/mafredri/cdp/protocol/animation"
"github.com/mafredri/cdp/protocol/applicationcache"
"github.com/mafredri/cdp/protocol/audits"
"github.com/mafredri/cdp/protocol/browser"
"github.com/mafredri/cdp/protocol/cachestorage"
"github.com/mafredri/cdp/protocol/console"
"github.com/mafredri/cdp/protocol/css"
"github.com/mafredri/cdp/protocol/database"
"github.com/mafredri/cdp/protocol/debugger"
"github.com/mafredri/cdp/protocol/deviceorientation"
"github.com/mafredri/cdp/protocol/dom"
"github.com/mafredri/cdp/protocol/domdebugger"
"github.com/mafredri/cdp/protocol/domsnapshot"
"github.com/mafredri/cdp/protocol/domstorage"
"github.com/mafredri/cdp/protocol/emulation"
"github.com/mafredri/cdp/protocol/headlessexperimental"
"github.com/mafredri/cdp/protocol/heapprofiler"
"github.com/mafredri/cdp/protocol/indexeddb"
"github.com/mafredri/cdp/protocol/input"
"github.com/mafredri/cdp/protocol/inspector"
"github.com/mafredri/cdp/protocol/io"
"github.com/mafredri/cdp/protocol/layertree"
"github.com/mafredri/cdp/protocol/log"
"github.com/mafredri/cdp/protocol/memory"
"github.com/mafredri/cdp/protocol/network"
"github.com/mafredri/cdp/protocol/overlay"
"github.com/mafredri/cdp/protocol/page"
"github.com/mafredri/cdp/protocol/performance"
"github.com/mafredri/cdp/protocol/profiler"
"github.com/mafredri/cdp/protocol/runtime"
"github.com/mafredri/cdp/protocol/schema"
"github.com/mafredri/cdp/protocol/security"
"github.com/mafredri/cdp/protocol/serviceworker"
"github.com/mafredri/cdp/protocol/storage"
"github.com/mafredri/cdp/protocol/systeminfo"
"github.com/mafredri/cdp/protocol/target"
"github.com/mafredri/cdp/protocol/tethering"
"github.com/mafredri/cdp/protocol/tracing"
)
// The Accessibility domain.
//
// Note: This domain is experimental.
type Accessibility interface {
// Command GetPartialAXTree
//
// Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
//
// Note: This command is experimental.
GetPartialAXTree(context.Context, *accessibility.GetPartialAXTreeArgs) (*accessibility.GetPartialAXTreeReply, error)
}
// The Animation domain.
//
// Note: This domain is experimental.
type Animation interface {
// Command Enable
//
// Enables animation domain notifications.
Enable(context.Context) error
// Command Disable
//
// Disables animation domain notifications.
Disable(context.Context) error
// Command GetPlaybackRate
//
// Gets the playback rate of the document timeline.
GetPlaybackRate(context.Context) (*animation.GetPlaybackRateReply, error)
// Command SetPlaybackRate
//
// Sets the playback rate of the document timeline.
SetPlaybackRate(context.Context, *animation.SetPlaybackRateArgs) error
// Command GetCurrentTime
//
// Returns the current time of the an animation.
GetCurrentTime(context.Context, *animation.GetCurrentTimeArgs) (*animation.GetCurrentTimeReply, error)
// Command SetPaused
//
// Sets the paused state of a set of animations.
SetPaused(context.Context, *animation.SetPausedArgs) error
// Command SetTiming
//
// Sets the timing of an animation node.
SetTiming(context.Context, *animation.SetTimingArgs) error
// Command SeekAnimations
//
// Seek a set of animations to a particular time within each animation.
SeekAnimations(context.Context, *animation.SeekAnimationsArgs) error
// Command ReleaseAnimations
//
// Releases a set of animations to no longer be manipulated.
ReleaseAnimations(context.Context, *animation.ReleaseAnimationsArgs) error
// Command ResolveAnimation
//
// Gets the remote object of the Animation.
ResolveAnimation(context.Context, *animation.ResolveAnimationArgs) (*animation.ResolveAnimationReply, error)
// Event AnimationCreated
//
// Event for each animation that has been created.
AnimationCreated(context.Context) (animation.CreatedClient, error)
// Event AnimationStarted
//
// Event for animation that has been started.
AnimationStarted(context.Context) (animation.StartedClient, error)
// Event AnimationCanceled
//
// Event for when an animation has been canceled.
AnimationCanceled(context.Context) (animation.CanceledClient, error)
}
// The ApplicationCache domain.
//
// Note: This domain is experimental.
type ApplicationCache interface {
// Command GetFramesWithManifests
//
// Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
GetFramesWithManifests(context.Context) (*applicationcache.GetFramesWithManifestsReply, error)
// Command Enable
//
// Enables application cache domain notifications.
Enable(context.Context) error
// Command GetManifestForFrame
//
// Returns manifest URL for document in the given frame.
GetManifestForFrame(context.Context, *applicationcache.GetManifestForFrameArgs) (*applicationcache.GetManifestForFrameReply, error)
// Command GetApplicationCacheForFrame
//
// Returns relevant application cache data for the document in given frame.
GetApplicationCacheForFrame(context.Context, *applicationcache.GetApplicationCacheForFrameArgs) (*applicationcache.GetApplicationCacheForFrameReply, error)
// Event ApplicationCacheStatusUpdated
ApplicationCacheStatusUpdated(context.Context) (applicationcache.StatusUpdatedClient, error)
// Event NetworkStateUpdated
NetworkStateUpdated(context.Context) (applicationcache.NetworkStateUpdatedClient, error)
}
// The Audits domain. Audits domain allows investigation of page violations and possible improvements.
//
// Note: This domain is experimental.
type Audits interface {
// Command GetEncodedResponse
//
// Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
GetEncodedResponse(context.Context, *audits.GetEncodedResponseArgs) (*audits.GetEncodedResponseReply, error)
}
// The Browser domain. The Browser domain defines methods and events for browser managing.
type Browser interface {
// Command Close
//
// Close browser gracefully.
Close(context.Context) error
// Command GetWindowForTarget
//
// Get the browser window that contains the devtools target.
//
// Note: This command is experimental.
GetWindowForTarget(context.Context, *browser.GetWindowForTargetArgs) (*browser.GetWindowForTargetReply, error)
// Command GetVersion
//
// Returns version information.
GetVersion(context.Context) (*browser.GetVersionReply, error)
// Command SetWindowBounds
//
// Set position and/or size of the browser window.
//
// Note: This command is experimental.
SetWindowBounds(context.Context, *browser.SetWindowBoundsArgs) error
// Command GetWindowBounds
//
// Get position and size of the browser window.
//
// Note: This command is experimental.
GetWindowBounds(context.Context, *browser.GetWindowBoundsArgs) (*browser.GetWindowBoundsReply, error)
}
// 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.
//
// Note: This domain is experimental.
type CSS interface {
// Command Enable
//
// 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.
Enable(context.Context) error
// Command Disable
//
// Disables the CSS agent for the given page.
Disable(context.Context) error
// Command GetMatchedStylesForNode
//
// Returns requested styles for a DOM node identified by nodeId.
GetMatchedStylesForNode(context.Context, *css.GetMatchedStylesForNodeArgs) (*css.GetMatchedStylesForNodeReply, error)
// Command GetInlineStylesForNode
//
// Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
GetInlineStylesForNode(context.Context, *css.GetInlineStylesForNodeArgs) (*css.GetInlineStylesForNodeReply, error)
// Command GetComputedStyleForNode
//
// Returns the computed style for a DOM node identified by nodeId.
GetComputedStyleForNode(context.Context, *css.GetComputedStyleForNodeArgs) (*css.GetComputedStyleForNodeReply, error)
// Command GetPlatformFontsForNode
//
// Requests information about platform fonts which we used to render child TextNodes in the given node.
GetPlatformFontsForNode(context.Context, *css.GetPlatformFontsForNodeArgs) (*css.GetPlatformFontsForNodeReply, error)
// Command GetStyleSheetText
//
// Returns the current textual content and the URL for a stylesheet.
GetStyleSheetText(context.Context, *css.GetStyleSheetTextArgs) (*css.GetStyleSheetTextReply, error)
// Command CollectClassNames
//
// Returns all class names from specified stylesheet.
CollectClassNames(context.Context, *css.CollectClassNamesArgs) (*css.CollectClassNamesReply, error)
// Command SetStyleSheetText
//
// Sets the new stylesheet text.
SetStyleSheetText(context.Context, *css.SetStyleSheetTextArgs) (*css.SetStyleSheetTextReply, error)
// Command SetRuleSelector
//
// Modifies the rule selector.
SetRuleSelector(context.Context, *css.SetRuleSelectorArgs) (*css.SetRuleSelectorReply, error)
// Command SetKeyframeKey
//
// Modifies the keyframe rule key text.
SetKeyframeKey(context.Context, *css.SetKeyframeKeyArgs) (*css.SetKeyframeKeyReply, error)
// Command SetStyleTexts
//
// Applies specified style edits one after another in the given order.
SetStyleTexts(context.Context, *css.SetStyleTextsArgs) (*css.SetStyleTextsReply, error)
// Command SetMediaText
//
// Modifies the rule selector.
SetMediaText(context.Context, *css.SetMediaTextArgs) (*css.SetMediaTextReply, error)
// Command CreateStyleSheet
//
// Creates a new special "via-inspector" stylesheet in the frame with given frameId.
CreateStyleSheet(context.Context, *css.CreateStyleSheetArgs) (*css.CreateStyleSheetReply, error)
// Command AddRule
//
// Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.
AddRule(context.Context, *css.AddRuleArgs) (*css.AddRuleReply, error)
// Command ForcePseudoState
//
// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
ForcePseudoState(context.Context, *css.ForcePseudoStateArgs) error
// Command GetMediaQueries
//
// Returns all media queries parsed by the rendering engine.
GetMediaQueries(context.Context) (*css.GetMediaQueriesReply, error)
// Command SetEffectivePropertyValueForNode
//
// Find a rule with the given active property for the given node and set the new value for this property
SetEffectivePropertyValueForNode(context.Context, *css.SetEffectivePropertyValueForNodeArgs) error
// Command GetBackgroundColors
GetBackgroundColors(context.Context, *css.GetBackgroundColorsArgs) (*css.GetBackgroundColorsReply, error)
// Command StartRuleUsageTracking
//
// Enables the selector recording.
StartRuleUsageTracking(context.Context) error
// Command TakeCoverageDelta
//
// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
TakeCoverageDelta(context.Context) (*css.TakeCoverageDeltaReply, error)
// Command StopRuleUsageTracking
//
// The list of rules with an indication of whether these were used
StopRuleUsageTracking(context.Context) (*css.StopRuleUsageTrackingReply, error)
// Event MediaQueryResultChanged
//
// Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
MediaQueryResultChanged(context.Context) (css.MediaQueryResultChangedClient, error)
// Event FontsUpdated
//
// Fires whenever a web font gets loaded.
FontsUpdated(context.Context) (css.FontsUpdatedClient, error)
// Event StyleSheetChanged
//
// Fired whenever a stylesheet is changed as a result of the client operation.
StyleSheetChanged(context.Context) (css.StyleSheetChangedClient, error)
// Event StyleSheetAdded
//
// Fired whenever an active document stylesheet is added.
StyleSheetAdded(context.Context) (css.StyleSheetAddedClient, error)
// Event StyleSheetRemoved
//
// Fired whenever an active document stylesheet is removed.
StyleSheetRemoved(context.Context) (css.StyleSheetRemovedClient, error)
}
// The CacheStorage domain.
//
// Note: This domain is experimental.
type CacheStorage interface {
// Command RequestCacheNames
//
// Requests cache names.
RequestCacheNames(context.Context, *cachestorage.RequestCacheNamesArgs) (*cachestorage.RequestCacheNamesReply, error)
// Command RequestEntries
//
// Requests data from cache.
RequestEntries(context.Context, *cachestorage.RequestEntriesArgs) (*cachestorage.RequestEntriesReply, error)
// Command DeleteCache
//
// Deletes a cache.
DeleteCache(context.Context, *cachestorage.DeleteCacheArgs) error
// Command DeleteEntry
//
// Deletes a cache entry.
DeleteEntry(context.Context, *cachestorage.DeleteEntryArgs) error
// Command RequestCachedResponse
//
// Fetches cache entry.
RequestCachedResponse(context.Context, *cachestorage.RequestCachedResponseArgs) (*cachestorage.RequestCachedResponseReply, error)
}
// The Console domain.
//
// Deprecated: This domain is deprecated - use Runtime or Log instead.
type Console interface {
// Command Enable
//
// Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.
Enable(context.Context) error
// Command Disable
//
// Disables console domain, prevents further console messages from being reported to the client.
Disable(context.Context) error
// Command ClearMessages
//
// Does nothing.
ClearMessages(context.Context) error
// Event MessageAdded
//
// Issued when new console message is added.
MessageAdded(context.Context) (console.MessageAddedClient, error)
}
// 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.
type DOM interface {
// Command Enable
//
// Enables DOM agent for the given page.
Enable(context.Context) error
// Command Disable
//
// Disables DOM agent for the given page.
Disable(context.Context) error
// Command GetDocument
//
// Returns the root DOM node (and optionally the subtree) to the caller.
GetDocument(context.Context, *dom.GetDocumentArgs) (*dom.GetDocumentReply, error)
// Command GetFlattenedDocument
//
// Returns the root DOM node (and optionally the subtree) to the caller.
GetFlattenedDocument(context.Context, *dom.GetFlattenedDocumentArgs) (*dom.GetFlattenedDocumentReply, error)
// Command CollectClassNamesFromSubtree
//
// Collects class names for the node with given id and all of it's child nodes.
//
// Note: This command is experimental.
CollectClassNamesFromSubtree(context.Context, *dom.CollectClassNamesFromSubtreeArgs) (*dom.CollectClassNamesFromSubtreeReply, error)
// Command RequestChildNodes
//
// 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.
RequestChildNodes(context.Context, *dom.RequestChildNodesArgs) error
// Command QuerySelector
//
// Executes querySelector on a given node.
QuerySelector(context.Context, *dom.QuerySelectorArgs) (*dom.QuerySelectorReply, error)
// Command QuerySelectorAll
//
// Executes querySelectorAll on a given node.
QuerySelectorAll(context.Context, *dom.QuerySelectorAllArgs) (*dom.QuerySelectorAllReply, error)
// Command SetNodeName
//
// Sets node name for a node with given id.
SetNodeName(context.Context, *dom.SetNodeNameArgs) (*dom.SetNodeNameReply, error)
// Command SetNodeValue
//
// Sets node value for a node with given id.
SetNodeValue(context.Context, *dom.SetNodeValueArgs) error
// Command RemoveNode
//
// Removes node with given id.
RemoveNode(context.Context, *dom.RemoveNodeArgs) error
// Command SetAttributeValue
//
// Sets attribute for an element with given id.
SetAttributeValue(context.Context, *dom.SetAttributeValueArgs) error
// Command SetAttributesAsText
//
// 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.
SetAttributesAsText(context.Context, *dom.SetAttributesAsTextArgs) error
// Command RemoveAttribute
//
// Removes attribute with given name from an element with given id.
RemoveAttribute(context.Context, *dom.RemoveAttributeArgs) error
// Command GetOuterHTML
//
// Returns node's HTML markup.
GetOuterHTML(context.Context, *dom.GetOuterHTMLArgs) (*dom.GetOuterHTMLReply, error)
// Command SetOuterHTML
//
// Sets node HTML markup, returns new node id.
SetOuterHTML(context.Context, *dom.SetOuterHTMLArgs) error
// Command PerformSearch
//
// Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.
//
// Note: This command is experimental.
PerformSearch(context.Context, *dom.PerformSearchArgs) (*dom.PerformSearchReply, error)
// Command GetSearchResults
//
// Returns search results from given fromIndex to given toIndex from the search with the given identifier.
//
// Note: This command is experimental.
GetSearchResults(context.Context, *dom.GetSearchResultsArgs) (*dom.GetSearchResultsReply, error)
// Command DiscardSearchResults
//
// Discards search results from the session with the given id. getSearchResults should no longer be called for that search.
//
// Note: This command is experimental.
DiscardSearchResults(context.Context, *dom.DiscardSearchResultsArgs) error
// Command RequestNode
//
// 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.
RequestNode(context.Context, *dom.RequestNodeArgs) (*dom.RequestNodeReply, error)
// Command PushNodeByPathToFrontend
//
// Requests that the node is sent to the caller given its path. // FIXME, use XPath
//
// Note: This command is experimental.
PushNodeByPathToFrontend(context.Context, *dom.PushNodeByPathToFrontendArgs) (*dom.PushNodeByPathToFrontendReply, error)
// Command PushNodesByBackendIdsToFrontend
//
// Requests that a batch of nodes is sent to the caller given their backend node ids.
//
// Note: This command is experimental.
PushNodesByBackendIdsToFrontend(context.Context, *dom.PushNodesByBackendIdsToFrontendArgs) (*dom.PushNodesByBackendIdsToFrontendReply, error)
// Command SetInspectedNode
//
// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
//
// Note: This command is experimental.
SetInspectedNode(context.Context, *dom.SetInspectedNodeArgs) error
// Command ResolveNode
//
// Resolves the JavaScript node object for a given NodeId or BackendNodeId.
ResolveNode(context.Context, *dom.ResolveNodeArgs) (*dom.ResolveNodeReply, error)
// Command GetAttributes
//
// Returns attributes for the specified node.
GetAttributes(context.Context, *dom.GetAttributesArgs) (*dom.GetAttributesReply, error)
// Command CopyTo
//
// Creates a deep copy of the specified node and places it into the target container before the given anchor.
//
// Note: This command is experimental.
CopyTo(context.Context, *dom.CopyToArgs) (*dom.CopyToReply, error)
// Command MoveTo
//
// Moves node into the new container, places it before the given anchor.
MoveTo(context.Context, *dom.MoveToArgs) (*dom.MoveToReply, error)
// Command Undo
//
// Undoes the last performed action.
//
// Note: This command is experimental.
Undo(context.Context) error
// Command Redo
//
// Re-does the last undone action.
//
// Note: This command is experimental.
Redo(context.Context) error
// Command MarkUndoableState
//
// Marks last undoable state.
//
// Note: This command is experimental.
MarkUndoableState(context.Context) error
// Command Focus
//
// Focuses the given element.
Focus(context.Context, *dom.FocusArgs) error
// Command SetFileInputFiles
//
// Sets files for the given file input element.
SetFileInputFiles(context.Context, *dom.SetFileInputFilesArgs) error
// Command GetBoxModel
//
// Returns boxes for the given node.
GetBoxModel(context.Context, *dom.GetBoxModelArgs) (*dom.GetBoxModelReply, error)
// Command GetNodeForLocation
//
// Returns node id at given location.
//
// Note: This command is experimental.
GetNodeForLocation(context.Context, *dom.GetNodeForLocationArgs) (*dom.GetNodeForLocationReply, error)
// Command GetRelayoutBoundary
//
// Returns the id of the nearest ancestor that is a relayout boundary.
//
// Note: This command is experimental.
GetRelayoutBoundary(context.Context, *dom.GetRelayoutBoundaryArgs) (*dom.GetRelayoutBoundaryReply, error)
// Command DescribeNode
//
// Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
DescribeNode(context.Context, *dom.DescribeNodeArgs) (*dom.DescribeNodeReply, error)
// Event DocumentUpdated
//
// Fired when Document has been totally updated. Node ids are no longer valid.
DocumentUpdated(context.Context) (dom.DocumentUpdatedClient, error)
// Event SetChildNodes
//
// Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
SetChildNodes(context.Context) (dom.SetChildNodesClient, error)
// Event AttributeModified
//
// Fired when Element's attribute is modified.
AttributeModified(context.Context) (dom.AttributeModifiedClient, error)
// Event AttributeRemoved
//
// Fired when Element's attribute is removed.
AttributeRemoved(context.Context) (dom.AttributeRemovedClient, error)
// Event InlineStyleInvalidated
//
// Fired when Element's inline style is modified via a CSS property modification.
//
// Note: This event is experimental.
InlineStyleInvalidated(context.Context) (dom.InlineStyleInvalidatedClient, error)
// Event CharacterDataModified
//
// Mirrors DOMCharacterDataModified event.
CharacterDataModified(context.Context) (dom.CharacterDataModifiedClient, error)
// Event ChildNodeCountUpdated
//
// Fired when Container's child node count has changed.
ChildNodeCountUpdated(context.Context) (dom.ChildNodeCountUpdatedClient, error)
// Event ChildNodeInserted
//
// Mirrors DOMNodeInserted event.
ChildNodeInserted(context.Context) (dom.ChildNodeInsertedClient, error)
// Event ChildNodeRemoved
//
// Mirrors DOMNodeRemoved event.
ChildNodeRemoved(context.Context) (dom.ChildNodeRemovedClient, error)
// Event ShadowRootPushed
//
// Called when shadow root is pushed into the element.
//
// Note: This event is experimental.
ShadowRootPushed(context.Context) (dom.ShadowRootPushedClient, error)
// Event ShadowRootPopped
//
// Called when shadow root is popped from the element.
//
// Note: This event is experimental.
ShadowRootPopped(context.Context) (dom.ShadowRootPoppedClient, error)
// Event PseudoElementAdded
//
// Called when a pseudo element is added to an element.
//
// Note: This event is experimental.
PseudoElementAdded(context.Context) (dom.PseudoElementAddedClient, error)
// Event PseudoElementRemoved
//
// Called when a pseudo element is removed from an element.
//
// Note: This event is experimental.
PseudoElementRemoved(context.Context) (dom.PseudoElementRemovedClient, error)
// Event DistributedNodesUpdated
//
// Called when distribution is changed.
//
// Note: This event is experimental.
DistributedNodesUpdated(context.Context) (dom.DistributedNodesUpdatedClient, error)
}
// 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.
type DOMDebugger interface {
// Command SetDOMBreakpoint
//
// Sets breakpoint on particular operation with DOM.
SetDOMBreakpoint(context.Context, *domdebugger.SetDOMBreakpointArgs) error
// Command RemoveDOMBreakpoint
//
// Removes DOM breakpoint that was set using setDOMBreakpoint.
RemoveDOMBreakpoint(context.Context, *domdebugger.RemoveDOMBreakpointArgs) error
// Command SetEventListenerBreakpoint
//
// Sets breakpoint on particular DOM event.
SetEventListenerBreakpoint(context.Context, *domdebugger.SetEventListenerBreakpointArgs) error
// Command RemoveEventListenerBreakpoint
//
// Removes breakpoint on particular DOM event.
RemoveEventListenerBreakpoint(context.Context, *domdebugger.RemoveEventListenerBreakpointArgs) error
// Command SetInstrumentationBreakpoint
//
// Sets breakpoint on particular native event.
//
// Note: This command is experimental.
SetInstrumentationBreakpoint(context.Context, *domdebugger.SetInstrumentationBreakpointArgs) error
// Command RemoveInstrumentationBreakpoint
//
// Removes breakpoint on particular native event.
//
// Note: This command is experimental.
RemoveInstrumentationBreakpoint(context.Context, *domdebugger.RemoveInstrumentationBreakpointArgs) error
// Command SetXHRBreakpoint
//
// Sets breakpoint on XMLHttpRequest.
SetXHRBreakpoint(context.Context, *domdebugger.SetXHRBreakpointArgs) error
// Command RemoveXHRBreakpoint
//
// Removes breakpoint from XMLHttpRequest.
RemoveXHRBreakpoint(context.Context, *domdebugger.RemoveXHRBreakpointArgs) error
// Command GetEventListeners
//
// Returns event listeners of the given object.
GetEventListeners(context.Context, *domdebugger.GetEventListenersArgs) (*domdebugger.GetEventListenersReply, error)
}
// The DOMSnapshot domain. This domain facilitates obtaining document snapshots with DOM, layout, and style information.
//
// Note: This domain is experimental.
type DOMSnapshot interface {
// Command GetSnapshot
//
// 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.
GetSnapshot(context.Context, *domsnapshot.GetSnapshotArgs) (*domsnapshot.GetSnapshotReply, error)
}
// The DOMStorage domain. Query and modify DOM storage.
//
// Note: This domain is experimental.
type DOMStorage interface {
// Command Enable
//
// Enables storage tracking, storage events will now be delivered to the client.
Enable(context.Context) error
// Command Disable
//
// Disables storage tracking, prevents storage events from being sent to the client.
Disable(context.Context) error
// Command Clear
Clear(context.Context, *domstorage.ClearArgs) error
// Command GetDOMStorageItems
GetDOMStorageItems(context.Context, *domstorage.GetDOMStorageItemsArgs) (*domstorage.GetDOMStorageItemsReply, error)
// Command SetDOMStorageItem
SetDOMStorageItem(context.Context, *domstorage.SetDOMStorageItemArgs) error
// Command RemoveDOMStorageItem
RemoveDOMStorageItem(context.Context, *domstorage.RemoveDOMStorageItemArgs) error
// Event DOMStorageItemsCleared
DOMStorageItemsCleared(context.Context) (domstorage.ItemsClearedClient, error)
// Event DOMStorageItemRemoved
DOMStorageItemRemoved(context.Context) (domstorage.ItemRemovedClient, error)
// Event DOMStorageItemAdded
DOMStorageItemAdded(context.Context) (domstorage.ItemAddedClient, error)
// Event DOMStorageItemUpdated
DOMStorageItemUpdated(context.Context) (domstorage.ItemUpdatedClient, error)
}
// The Database domain.
//
// Note: This domain is experimental.
type Database interface {
// Command Enable
//
// Enables database tracking, database events will now be delivered to the client.
Enable(context.Context) error
// Command Disable
//
// Disables database tracking, prevents database events from being sent to the client.
Disable(context.Context) error
// Command GetDatabaseTableNames
GetDatabaseTableNames(context.Context, *database.GetDatabaseTableNamesArgs) (*database.GetDatabaseTableNamesReply, error)
// Command ExecuteSQL
ExecuteSQL(context.Context, *database.ExecuteSQLArgs) (*database.ExecuteSQLReply, error)
// Event AddDatabase
AddDatabase(context.Context) (database.AddDatabaseClient, error)
}
// The Debugger domain. Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
type Debugger interface {
// Command Enable
//
// Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
Enable(context.Context) error
// Command Disable
//
// Disables debugger for given page.
Disable(context.Context) error
// Command SetBreakpointsActive
//
// Activates / deactivates all breakpoints on the page.
SetBreakpointsActive(context.Context, *debugger.SetBreakpointsActiveArgs) error
// Command SetSkipAllPauses
//
// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
SetSkipAllPauses(context.Context, *debugger.SetSkipAllPausesArgs) error
// Command SetBreakpointByURL
//
// 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.
SetBreakpointByURL(context.Context, *debugger.SetBreakpointByURLArgs) (*debugger.SetBreakpointByURLReply, error)
// Command SetBreakpoint
//
// Sets JavaScript breakpoint at a given location.
SetBreakpoint(context.Context, *debugger.SetBreakpointArgs) (*debugger.SetBreakpointReply, error)
// Command RemoveBreakpoint
//
// Removes JavaScript breakpoint.
RemoveBreakpoint(context.Context, *debugger.RemoveBreakpointArgs) error
// Command GetPossibleBreakpoints
//
// Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
//
// Note: This command is experimental.
GetPossibleBreakpoints(context.Context, *debugger.GetPossibleBreakpointsArgs) (*debugger.GetPossibleBreakpointsReply, error)
// Command ContinueToLocation
//
// Continues execution until specific location is reached.
ContinueToLocation(context.Context, *debugger.ContinueToLocationArgs) error
// Command PauseOnAsyncTask
//
// Note: This command is experimental.
PauseOnAsyncTask(context.Context, *debugger.PauseOnAsyncTaskArgs) error
// Command StepOver
//
// Steps over the statement.
StepOver(context.Context) error
// Command StepInto
//
// Steps into the function call.
StepInto(context.Context, *debugger.StepIntoArgs) error
// Command StepOut
//
// Steps out of the function call.
StepOut(context.Context) error
// Command Pause
//
// Stops on the next JavaScript statement.
Pause(context.Context) error
// Command ScheduleStepIntoAsync
//
// This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. 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.
//
// Note: This command is experimental.
ScheduleStepIntoAsync(context.Context) error
// Command Resume
//
// Resumes JavaScript execution.
Resume(context.Context) error
// Command SearchInContent
//
// Searches for given string in script content.
//
// Note: This command is experimental.
SearchInContent(context.Context, *debugger.SearchInContentArgs) (*debugger.SearchInContentReply, error)
// Command SetScriptSource
//
// Edits JavaScript source live.
SetScriptSource(context.Context, *debugger.SetScriptSourceArgs) (*debugger.SetScriptSourceReply, error)
// Command RestartFrame
//
// Restarts particular call frame from the beginning.
RestartFrame(context.Context, *debugger.RestartFrameArgs) (*debugger.RestartFrameReply, error)
// Command GetScriptSource
//
// Returns source for the script with given id.
GetScriptSource(context.Context, *debugger.GetScriptSourceArgs) (*debugger.GetScriptSourceReply, error)
// Command SetPauseOnExceptions
//
// 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.
SetPauseOnExceptions(context.Context, *debugger.SetPauseOnExceptionsArgs) error
// Command EvaluateOnCallFrame
//
// Evaluates expression on a given call frame.
EvaluateOnCallFrame(context.Context, *debugger.EvaluateOnCallFrameArgs) (*debugger.EvaluateOnCallFrameReply, error)
// Command SetVariableValue
//
// Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
SetVariableValue(context.Context, *debugger.SetVariableValueArgs) error
// Command SetReturnValue
//
// Changes return value in top frame. Available only at return break position.
//
// Note: This command is experimental.
SetReturnValue(context.Context, *debugger.SetReturnValueArgs) error
// Command SetAsyncCallStackDepth
//
// Enables or disables async call stacks tracking.
SetAsyncCallStackDepth(context.Context, *debugger.SetAsyncCallStackDepthArgs) error
// Command SetBlackboxPatterns
//
// 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.
//
// Note: This command is experimental.
SetBlackboxPatterns(context.Context, *debugger.SetBlackboxPatternsArgs) error
// Command SetBlackboxedRanges
//
// 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.
//
// Note: This command is experimental.
SetBlackboxedRanges(context.Context, *debugger.SetBlackboxedRangesArgs) error
// Event ScriptParsed
//
// Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
ScriptParsed(context.Context) (debugger.ScriptParsedClient, error)
// Event ScriptFailedToParse
//
// Fired when virtual machine fails to parse the script.
ScriptFailedToParse(context.Context) (debugger.ScriptFailedToParseClient, error)
// Event BreakpointResolved
//
// Fired when breakpoint is resolved to an actual script and location.
BreakpointResolved(context.Context) (debugger.BreakpointResolvedClient, error)
// Event Paused
//
// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Paused(context.Context) (debugger.PausedClient, error)
// Event Resumed
//
// Fired when the virtual machine resumed execution.
Resumed(context.Context) (debugger.ResumedClient, error)
}
// The DeviceOrientation domain.
//
// Note: This domain is experimental.
type DeviceOrientation interface {
// Command SetDeviceOrientationOverride
//
// Overrides the Device Orientation.
SetDeviceOrientationOverride(context.Context, *deviceorientation.SetDeviceOrientationOverrideArgs) error
// Command ClearDeviceOrientationOverride
//
// Clears the overridden Device Orientation.
ClearDeviceOrientationOverride(context.Context) error
}
// The Emulation domain. This domain emulates different environments for the page.
type Emulation interface {
// Command SetDeviceMetricsOverride
//
// 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).
SetDeviceMetricsOverride(context.Context, *emulation.SetDeviceMetricsOverrideArgs) error
// Command ClearDeviceMetricsOverride
//
// Clears the overridden device metrics.
ClearDeviceMetricsOverride(context.Context) error
// Command ResetPageScaleFactor
//
// Requests that page scale factor is reset to initial values.
//
// Note: This command is experimental.
ResetPageScaleFactor(context.Context) error
// Command SetPageScaleFactor
//
// Sets a specified page scale factor.
//
// Note: This command is experimental.
SetPageScaleFactor(context.Context, *emulation.SetPageScaleFactorArgs) error
// Command SetVisibleSize
//
// Deprecated: 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.
//
// Note: This command is experimental.
SetVisibleSize(context.Context, *emulation.SetVisibleSizeArgs) error
// Command SetScriptExecutionDisabled
//
// Switches script execution in the page.
SetScriptExecutionDisabled(context.Context, *emulation.SetScriptExecutionDisabledArgs) error
// Command SetGeolocationOverride
//
// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
SetGeolocationOverride(context.Context, *emulation.SetGeolocationOverrideArgs) error
// Command ClearGeolocationOverride
//
// Clears the overridden Geolocation Position and Error.
ClearGeolocationOverride(context.Context) error
// Command SetTouchEmulationEnabled
//
// Enables touch on platforms which do not support them.
SetTouchEmulationEnabled(context.Context, *emulation.SetTouchEmulationEnabledArgs) error
// Command SetEmitTouchEventsForMouse
//
// Note: This command is experimental.
SetEmitTouchEventsForMouse(context.Context, *emulation.SetEmitTouchEventsForMouseArgs) error
// Command SetEmulatedMedia
//
// Emulates the given media for CSS media queries.
SetEmulatedMedia(context.Context, *emulation.SetEmulatedMediaArgs) error
// Command SetCPUThrottlingRate
//
// Enables CPU throttling to emulate slow CPUs.
//
// Note: This command is experimental.
SetCPUThrottlingRate(context.Context, *emulation.SetCPUThrottlingRateArgs) error
// Command CanEmulate
//
// Tells whether emulation is supported.
CanEmulate(context.Context) (*emulation.CanEmulateReply, error)
// Command SetVirtualTimePolicy
//
// 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.
//
// Note: This command is experimental.
SetVirtualTimePolicy(context.Context, *emulation.SetVirtualTimePolicyArgs) (*emulation.SetVirtualTimePolicyReply, error)
// Command SetNavigatorOverrides
//
// Overrides value returned by the javascript navigator object.
//
// Note: This command is experimental.
SetNavigatorOverrides(context.Context, *emulation.SetNavigatorOverridesArgs) error
// Command SetDefaultBackgroundColorOverride
//
// Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
SetDefaultBackgroundColorOverride(context.Context, *emulation.SetDefaultBackgroundColorOverrideArgs) error
// Event VirtualTimeBudgetExpired
//
// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
//
// Note: This event is experimental.
VirtualTimeBudgetExpired(context.Context) (emulation.VirtualTimeBudgetExpiredClient, error)
// Event VirtualTimeAdvanced
//
// Notification sent after the virtual time has advanced.
//
// Note: This event is experimental.
VirtualTimeAdvanced(context.Context) (emulation.VirtualTimeAdvancedClient, error)
// Event VirtualTimePaused
//
// Notification sent after the virtual time has paused.
//
// Note: This event is experimental.
VirtualTimePaused(context.Context) (emulation.VirtualTimePausedClient, error)
}
// The HeadlessExperimental domain. This domain provides experimental commands only supported in headless mode.
//
// Note: This domain is experimental.
type HeadlessExperimental interface {
// Command Enable
//
// Enables headless events for the target.
Enable(context.Context) error
// Command Disable
//
// Disables headless events for the target.
Disable(context.Context) error
// Command BeginFrame
//
// Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl.
BeginFrame(context.Context, *headlessexperimental.BeginFrameArgs) (*headlessexperimental.BeginFrameReply, error)
// Event NeedsBeginFramesChanged
//
// Issued when the target starts or stops needing BeginFrames.
NeedsBeginFramesChanged(context.Context) (headlessexperimental.NeedsBeginFramesChangedClient, error)
// Event MainFrameReadyForScreenshots
//
// Issued when the main frame has first submitted a frame to the browser. May only be fired while a BeginFrame is in flight. Before this event, screenshotting requests may fail.
MainFrameReadyForScreenshots(context.Context) (headlessexperimental.MainFrameReadyForScreenshotsClient, error)
}
// The HeapProfiler domain.
//
// Note: This domain is experimental.
type HeapProfiler interface {
// Command Enable
Enable(context.Context) error
// Command Disable
Disable(context.Context) error
// Command StartTrackingHeapObjects
StartTrackingHeapObjects(context.Context, *heapprofiler.StartTrackingHeapObjectsArgs) error
// Command StopTrackingHeapObjects
StopTrackingHeapObjects(context.Context, *heapprofiler.StopTrackingHeapObjectsArgs) error
// Command TakeHeapSnapshot
TakeHeapSnapshot(context.Context, *heapprofiler.TakeHeapSnapshotArgs) error
// Command CollectGarbage
CollectGarbage(context.Context) error
// Command GetObjectByHeapObjectID
GetObjectByHeapObjectID(context.Context, *heapprofiler.GetObjectByHeapObjectIDArgs) (*heapprofiler.GetObjectByHeapObjectIDReply, error)
// Command AddInspectedHeapObject
//
// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
AddInspectedHeapObject(context.Context, *heapprofiler.AddInspectedHeapObjectArgs) error
// Command GetHeapObjectID
GetHeapObjectID(context.Context, *heapprofiler.GetHeapObjectIDArgs) (*heapprofiler.GetHeapObjectIDReply, error)
// Command StartSampling
StartSampling(context.Context, *heapprofiler.StartSamplingArgs) error
// Command StopSampling
StopSampling(context.Context) (*heapprofiler.StopSamplingReply, error)
// Command GetSamplingProfile
GetSamplingProfile(context.Context) (*heapprofiler.GetSamplingProfileReply, error)
// Event AddHeapSnapshotChunk
AddHeapSnapshotChunk(context.Context) (heapprofiler.AddHeapSnapshotChunkClient, error)
// Event ResetProfiles
ResetProfiles(context.Context) (heapprofiler.ResetProfilesClient, error)
// Event ReportHeapSnapshotProgress
ReportHeapSnapshotProgress(context.Context) (heapprofiler.ReportHeapSnapshotProgressClient, error)
// Event LastSeenObjectID
//
// 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.
LastSeenObjectID(context.Context) (heapprofiler.LastSeenObjectIDClient, error)
// Event HeapStatsUpdate
//
// If heap objects tracking has been started then backend may send update for one or more fragments
HeapStatsUpdate(context.Context) (heapprofiler.HeapStatsUpdateClient, error)
}
// The IO domain. Input/Output operations for streams produced by DevTools.
type IO interface {
// Command Read
//
// Read a chunk of the stream
Read(context.Context, *io.ReadArgs) (*io.ReadReply, error)
// Command Close
//
// Close the stream, discard any temporary backing storage.
Close(context.Context, *io.CloseArgs) error
// Command ResolveBlob
//
// Return UUID of Blob object specified by a remote object id.
ResolveBlob(context.Context, *io.ResolveBlobArgs) (*io.ResolveBlobReply, error)
}
// The IndexedDB domain.
//
// Note: This domain is experimental.
type IndexedDB interface {
// Command Enable
//
// Enables events from backend.
Enable(context.Context) error
// Command Disable
//
// Disables events from backend.
Disable(context.Context) error
// Command RequestDatabaseNames
//
// Requests database names for given security origin.
RequestDatabaseNames(context.Context, *indexeddb.RequestDatabaseNamesArgs) (*indexeddb.RequestDatabaseNamesReply, error)
// Command RequestDatabase
//
// Requests database with given name in given frame.
RequestDatabase(context.Context, *indexeddb.RequestDatabaseArgs) (*indexeddb.RequestDatabaseReply, error)
// Command RequestData
//
// Requests data from object store or index.
RequestData(context.Context, *indexeddb.RequestDataArgs) (*indexeddb.RequestDataReply, error)
// Command ClearObjectStore
//
// Clears all entries from an object store.
ClearObjectStore(context.Context, *indexeddb.ClearObjectStoreArgs) error
// Command DeleteDatabase
//
// Deletes a database.
DeleteDatabase(context.Context, *indexeddb.DeleteDatabaseArgs) error
}
// The Input domain.
type Input interface {
// Command SetIgnoreInputEvents
//
// Ignores input events (useful while auditing page).
SetIgnoreInputEvents(context.Context, *input.SetIgnoreInputEventsArgs) error
// Command DispatchKeyEvent
//
// Dispatches a key event to the page.
DispatchKeyEvent(context.Context, *input.DispatchKeyEventArgs) error
// Command DispatchMouseEvent
//
// Dispatches a mouse event to the page.
DispatchMouseEvent(context.Context, *input.DispatchMouseEventArgs) error
// Command DispatchTouchEvent
//
// Dispatches a touch event to the page.
DispatchTouchEvent(context.Context, *input.DispatchTouchEventArgs) error
// Command EmulateTouchFromMouseEvent
//
// Emulates touch event from the mouse event parameters.
//
// Note: This command is experimental.
EmulateTouchFromMouseEvent(context.Context, *input.EmulateTouchFromMouseEventArgs) error
// Command SynthesizePinchGesture
//
// Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
//
// Note: This command is experimental.
SynthesizePinchGesture(context.Context, *input.SynthesizePinchGestureArgs) error
// Command SynthesizeScrollGesture
//
// Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
//
// Note: This command is experimental.
SynthesizeScrollGesture(context.Context, *input.SynthesizeScrollGestureArgs) error
// Command SynthesizeTapGesture
//
// Synthesizes a tap gesture over a time period by issuing appropriate touch events.
//
// Note: This command is experimental.
SynthesizeTapGesture(context.Context, *input.SynthesizeTapGestureArgs) error
}
// The Inspector domain.
//
// Note: This domain is experimental.
type Inspector interface {
// Command Enable
//
// Enables inspector domain notifications.
Enable(context.Context) error
// Command Disable
//
// Disables inspector domain notifications.
Disable(context.Context) error
// Event Detached
//
// Fired when remote debugging connection is about to be terminated. Contains detach reason.
Detached(context.Context) (inspector.DetachedClient, error)
// Event TargetCrashed
//
// Fired when debugging target has crashed
TargetCrashed(context.Context) (inspector.TargetCrashedClient, error)
}
// The LayerTree domain.
//
// Note: This domain is experimental.
type LayerTree interface {
// Command Enable
//
// Enables compositing tree inspection.
Enable(context.Context) error
// Command Disable
//
// Disables compositing tree inspection.
Disable(context.Context) error
// Command CompositingReasons
//
// Provides the reasons why the given layer was composited.
CompositingReasons(context.Context, *layertree.CompositingReasonsArgs) (*layertree.CompositingReasonsReply, error)
// Command MakeSnapshot
//
// Returns the layer snapshot identifier.
MakeSnapshot(context.Context, *layertree.MakeSnapshotArgs) (*layertree.MakeSnapshotReply, error)
// Command LoadSnapshot
//
// Returns the snapshot identifier.
LoadSnapshot(context.Context, *layertree.LoadSnapshotArgs) (*layertree.LoadSnapshotReply, error)
// Command ReleaseSnapshot
//
// Releases layer snapshot captured by the back-end.
ReleaseSnapshot(context.Context, *layertree.ReleaseSnapshotArgs) error
// Command ProfileSnapshot
ProfileSnapshot(context.Context, *layertree.ProfileSnapshotArgs) (*layertree.ProfileSnapshotReply, error)
// Command ReplaySnapshot
//
// Replays the layer snapshot and returns the resulting bitmap.
ReplaySnapshot(context.Context, *layertree.ReplaySnapshotArgs) (*layertree.ReplaySnapshotReply, error)
// Command SnapshotCommandLog
//
// Replays the layer snapshot and returns canvas log.
SnapshotCommandLog(context.Context, *layertree.SnapshotCommandLogArgs) (*layertree.SnapshotCommandLogReply, error)
// Event LayerTreeDidChange
LayerTreeDidChange(context.Context) (layertree.DidChangeClient, error)
// Event LayerPainted
LayerPainted(context.Context) (layertree.LayerPaintedClient, error)
}
// The Log domain. Provides access to log entries.
type Log interface {
// Command Enable
//
// Enables log domain, sends the entries collected so far to the client by means of the entryAdded notification.
Enable(context.Context) error
// Command Disable
//
// Disables log domain, prevents further log entries from being reported to the client.
Disable(context.Context) error
// Command Clear
//
// Clears the log.
Clear(context.Context) error
// Command StartViolationsReport
//
// start violation reporting.
StartViolationsReport(context.Context, *log.StartViolationsReportArgs) error
// Command StopViolationsReport
//
// Stop violation reporting.
StopViolationsReport(context.Context) error
// Event EntryAdded
//
// Issued when new message was logged.
EntryAdded(context.Context) (log.EntryAddedClient, error)
}
// The Memory domain.
//
// Note: This domain is experimental.
type Memory interface {
// Command GetDOMCounters
GetDOMCounters(context.Context) (*memory.GetDOMCountersReply, error)
// Command PrepareForLeakDetection
PrepareForLeakDetection(context.Context) error
// Command SetPressureNotificationsSuppressed
//
// Enable/disable suppressing memory pressure notifications in all processes.
SetPressureNotificationsSuppressed(context.Context, *memory.SetPressureNotificationsSuppressedArgs) error
// Command SimulatePressureNotification
//
// Simulate a memory pressure notification in all processes.
SimulatePressureNotification(context.Context, *memory.SimulatePressureNotificationArgs) error
}
// 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.
type Network interface {
// Command Enable
//
// Enables network tracking, network events will now be delivered to the client.
Enable(context.Context, *network.EnableArgs) error
// Command Disable
//
// Disables network tracking, prevents network events from being sent to the client.
Disable(context.Context) error
// Command SetUserAgentOverride
//
// Allows overriding user agent with the given string.
SetUserAgentOverride(context.Context, *network.SetUserAgentOverrideArgs) error
// Command SearchInResponseBody
//
// Searches for given string in response content.
//
// Note: This command is experimental.
SearchInResponseBody(context.Context, *network.SearchInResponseBodyArgs) (*network.SearchInResponseBodyReply, error)
// Command SetExtraHTTPHeaders
//
// Specifies whether to always send extra HTTP headers with the requests from this page.
SetExtraHTTPHeaders(context.Context, *network.SetExtraHTTPHeadersArgs) error
// Command GetResponseBody
//
// Returns content served for the given request.
GetResponseBody(context.Context, *network.GetResponseBodyArgs) (*network.GetResponseBodyReply, error)
// Command SetBlockedURLs
//
// Blocks URLs from loading.
//
// Note: This command is experimental.
SetBlockedURLs(context.Context, *network.SetBlockedURLsArgs) error
// Command ReplayXHR
//
// 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.
//
// Note: This command is experimental.
ReplayXHR(context.Context, *network.ReplayXHRArgs) error
// Command CanClearBrowserCache
//
// Deprecated: Tells whether clearing browser cache is supported.
CanClearBrowserCache(context.Context) (*network.CanClearBrowserCacheReply, error)
// Command ClearBrowserCache
//
// Clears browser cache.
ClearBrowserCache(context.Context) error
// Command CanClearBrowserCookies
//
// Deprecated: Tells whether clearing browser cookies is supported.
CanClearBrowserCookies(context.Context) (*network.CanClearBrowserCookiesReply, error)
// Command ClearBrowserCookies
//
// Clears browser cookies.
ClearBrowserCookies(context.Context) error
// Command GetCookies
//
// Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field.
GetCookies(context.Context, *network.GetCookiesArgs) (*network.GetCookiesReply, error)
// Command GetAllCookies
//
// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field.
GetAllCookies(context.Context) (*network.GetAllCookiesReply, error)
// Command DeleteCookies
//
// Deletes browser cookies with matching name and url or domain/path pair.
DeleteCookies(context.Context, *network.DeleteCookiesArgs) error
// Command SetCookie
//
// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
SetCookie(context.Context, *network.SetCookieArgs) (*network.SetCookieReply, error)
// Command SetCookies
//
// Sets given cookies.
SetCookies(context.Context, *network.SetCookiesArgs) error
// Command CanEmulateNetworkConditions
//
// Deprecated: Tells whether emulation of network conditions is supported.
CanEmulateNetworkConditions(context.Context) (*network.CanEmulateNetworkConditionsReply, error)
// Command EmulateNetworkConditions
//
// Activates emulation of network conditions.
EmulateNetworkConditions(context.Context, *network.EmulateNetworkConditionsArgs) error
// Command SetCacheDisabled
//
// Toggles ignoring cache for each request. If true, cache will not be used.
SetCacheDisabled(context.Context, *network.SetCacheDisabledArgs) error
// Command SetBypassServiceWorker
//
// Toggles ignoring of service worker for each request.
//
// Note: This command is experimental.
SetBypassServiceWorker(context.Context, *network.SetBypassServiceWorkerArgs) error
// Command SetDataSizeLimitsForTest
//
// For testing.
//
// Note: This command is experimental.
SetDataSizeLimitsForTest(context.Context, *network.SetDataSizeLimitsForTestArgs) error
// Command GetCertificate
//
// Returns the DER-encoded certificate.
//
// Note: This command is experimental.
GetCertificate(context.Context, *network.GetCertificateArgs) (*network.GetCertificateReply, error)
// Command SetRequestInterception
//
// Sets the requests to intercept that match a the provided patterns and optionally resource types.
//
// Note: This command is experimental.
SetRequestInterception(context.Context, *network.SetRequestInterceptionArgs) error
// Command ContinueInterceptedRequest
//
// 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.
//
// Note: This command is experimental.
ContinueInterceptedRequest(context.Context, *network.ContinueInterceptedRequestArgs) error
// Command GetResponseBodyForInterception
//
// Returns content served for the given currently intercepted request.
//
// Note: This command is experimental.
GetResponseBodyForInterception(context.Context, *network.GetResponseBodyForInterceptionArgs) (*network.GetResponseBodyForInterceptionReply, error)
// Event ResourceChangedPriority
//
// Fired when resource loading priority is changed
//
// Note: This event is experimental.
ResourceChangedPriority(context.Context) (network.ResourceChangedPriorityClient, error)
// Event RequestWillBeSent
//
// Fired when page is about to send HTTP request.
RequestWillBeSent(context.Context) (network.RequestWillBeSentClient, error)
// Event RequestServedFromCache
//
// Fired if request ended up loading from cache.
RequestServedFromCache(context.Context) (network.RequestServedFromCacheClient, error)
// Event ResponseReceived
//
// Fired when HTTP response is available.
ResponseReceived(context.Context) (network.ResponseReceivedClient, error)
// Event DataReceived
//
// Fired when data chunk was received over the network.
DataReceived(context.Context) (network.DataReceivedClient, error)
// Event LoadingFinished
//
// Fired when HTTP request has finished loading.
LoadingFinished(context.Context) (network.LoadingFinishedClient, error)
// Event LoadingFailed
//
// Fired when HTTP request has failed to load.
LoadingFailed(context.Context) (network.LoadingFailedClient, error)
// Event WebSocketWillSendHandshakeRequest
//
// Fired when WebSocket is about to initiate handshake.
WebSocketWillSendHandshakeRequest(context.Context) (network.WebSocketWillSendHandshakeRequestClient, error)
// Event WebSocketHandshakeResponseReceived
//
// Fired when WebSocket handshake response becomes available.
WebSocketHandshakeResponseReceived(context.Context) (network.WebSocketHandshakeResponseReceivedClient, error)
// Event WebSocketCreated
//
// Fired upon WebSocket creation.
WebSocketCreated(context.Context) (network.WebSocketCreatedClient, error)
// Event WebSocketClosed
//
// Fired when WebSocket is closed.
WebSocketClosed(context.Context) (network.WebSocketClosedClient, error)
// Event WebSocketFrameReceived
//
// Fired when WebSocket frame is received.
WebSocketFrameReceived(context.Context) (network.WebSocketFrameReceivedClient, error)
// Event WebSocketFrameError
//
// Fired when WebSocket frame error occurs.
WebSocketFrameError(context.Context) (network.WebSocketFrameErrorClient, error)
// Event WebSocketFrameSent
//
// Fired when WebSocket frame is sent.
WebSocketFrameSent(context.Context) (network.WebSocketFrameSentClient, error)
// Event EventSourceMessageReceived
//
// Fired when EventSource message is received.
EventSourceMessageReceived(context.Context) (network.EventSourceMessageReceivedClient, error)
// Event RequestIntercepted
//
// Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.
//
// Note: This event is experimental.
RequestIntercepted(context.Context) (network.RequestInterceptedClient, error)
}
// The Overlay domain. This domain provides various functionality related to drawing atop the inspected page.
//
// Note: This domain is experimental.
type Overlay interface {
// Command Enable
//
// Enables domain notifications.
Enable(context.Context) error
// Command Disable
//
// Disables domain notifications.
Disable(context.Context) error
// Command SetShowPaintRects
//
// Requests that backend shows paint rectangles
SetShowPaintRects(context.Context, *overlay.SetShowPaintRectsArgs) error
// Command SetShowDebugBorders
//
// Requests that backend shows debug borders on layers
SetShowDebugBorders(context.Context, *overlay.SetShowDebugBordersArgs) error
// Command SetShowFPSCounter
//
// Requests that backend shows the FPS counter
SetShowFPSCounter(context.Context, *overlay.SetShowFPSCounterArgs) error
// Command SetShowScrollBottleneckRects
//
// Requests that backend shows scroll bottleneck rects
SetShowScrollBottleneckRects(context.Context, *overlay.SetShowScrollBottleneckRectsArgs) error
// Command SetShowViewportSizeOnResize
//
// Paints viewport size upon main frame resize.
SetShowViewportSizeOnResize(context.Context, *overlay.SetShowViewportSizeOnResizeArgs) error
// Command SetPausedInDebuggerMessage
SetPausedInDebuggerMessage(context.Context, *overlay.SetPausedInDebuggerMessageArgs) error
// Command SetSuspended
SetSuspended(context.Context, *overlay.SetSuspendedArgs) error
// Command SetInspectMode
//
// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
SetInspectMode(context.Context, *overlay.SetInspectModeArgs) error
// Command HighlightRect
//
// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
HighlightRect(context.Context, *overlay.HighlightRectArgs) error
// Command HighlightQuad
//
// Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
HighlightQuad(context.Context, *overlay.HighlightQuadArgs) error
// Command HighlightNode
//
// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
HighlightNode(context.Context, *overlay.HighlightNodeArgs) error
// Command HighlightFrame
//
// Highlights owner element of the frame with given id.
HighlightFrame(context.Context, *overlay.HighlightFrameArgs) error
// Command HideHighlight
//
// Hides any highlight.
HideHighlight(context.Context) error
// Command GetHighlightObjectForTest
//
// For testing.
GetHighlightObjectForTest(context.Context, *overlay.GetHighlightObjectForTestArgs) (*overlay.GetHighlightObjectForTestReply, error)
// Event NodeHighlightRequested
//
// Fired when the node should be highlighted. This happens after call to setInspectMode.
NodeHighlightRequested(context.Context) (overlay.NodeHighlightRequestedClient, error)
// Event InspectNodeRequested
//
// Fired when the node should be inspected. This happens after call to setInspectMode or when user manually inspects an element.
InspectNodeRequested(context.Context) (overlay.InspectNodeRequestedClient, error)
// Event ScreenshotRequested
//
// Fired when user asks to capture screenshot of some area on the page.
ScreenshotRequested(context.Context) (overlay.ScreenshotRequestedClient, error)
}
// The Page domain. Actions and events related to the inspected page belong to the page domain.
type Page interface {
// Command Enable
//
// Enables page domain notifications.
Enable(context.Context) error
// Command Disable
//
// Disables page domain notifications.
Disable(context.Context) error
// Command AddScriptToEvaluateOnLoad
//
// Deprecated: Please use addScriptToEvaluateOnNewDocument instead.
//
// Note: This command is experimental.
AddScriptToEvaluateOnLoad(context.Context, *page.AddScriptToEvaluateOnLoadArgs) (*page.AddScriptToEvaluateOnLoadReply, error)
// Command RemoveScriptToEvaluateOnLoad
//
// Deprecated: Please use removeScriptToEvaluateOnNewDocument instead.
//
// Note: This command is experimental.
RemoveScriptToEvaluateOnLoad(context.Context, *page.RemoveScriptToEvaluateOnLoadArgs) error
// Command AddScriptToEvaluateOnNewDocument
//
// Evaluates given script in every frame upon creation (before loading frame's scripts).
AddScriptToEvaluateOnNewDocument(context.Context, *page.AddScriptToEvaluateOnNewDocumentArgs) (*page.AddScriptToEvaluateOnNewDocumentReply, error)
// Command RemoveScriptToEvaluateOnNewDocument
//
// Removes given script from the list.
RemoveScriptToEvaluateOnNewDocument(context.Context, *page.RemoveScriptToEvaluateOnNewDocumentArgs) error
// Command SetAutoAttachToCreatedPages
//
// Controls whether browser will open a new inspector window for connected pages.
//
// Note: This command is experimental.
SetAutoAttachToCreatedPages(context.Context, *page.SetAutoAttachToCreatedPagesArgs) error
// Command SetLifecycleEventsEnabled
//
// Controls whether page will emit lifecycle events.
//
// Note: This command is experimental.
SetLifecycleEventsEnabled(context.Context, *page.SetLifecycleEventsEnabledArgs) error
// Command Reload
//
// Reloads given page optionally ignoring the cache.
Reload(context.Context, *page.ReloadArgs) error
// Command SetAdBlockingEnabled
//
// Enable Chrome's experimental ad filter on all sites.
//
// Note: This command is experimental.
SetAdBlockingEnabled(context.Context, *page.SetAdBlockingEnabledArgs) error
// Command Navigate
//
// Navigates current page to the given URL.
Navigate(context.Context, *page.NavigateArgs) (*page.NavigateReply, error)
// Command StopLoading
//
// Force the page stop all navigations and pending resource fetches.
StopLoading(context.Context) error
// Command GetNavigationHistory
//
// Returns navigation history for the current page.
GetNavigationHistory(context.Context) (*page.GetNavigationHistoryReply, error)
// Command NavigateToHistoryEntry
//
// Navigates current page to the given history entry.
NavigateToHistoryEntry(context.Context, *page.NavigateToHistoryEntryArgs) error
// Command GetResourceTree
//
// Returns present frame / resource tree structure.
//
// Note: This command is experimental.
GetResourceTree(context.Context) (*page.GetResourceTreeReply, error)
// Command GetFrameTree
//
// Returns present frame tree structure.
GetFrameTree(context.Context) (*page.GetFrameTreeReply, error)
// Command GetResourceContent
//
// Returns content of the given resource.
//
// Note: This command is experimental.
GetResourceContent(context.Context, *page.GetResourceContentArgs) (*page.GetResourceContentReply, error)
// Command SearchInResource
//
// Searches for given string in resource content.
//
// Note: This command is experimental.
SearchInResource(context.Context, *page.SearchInResourceArgs) (*page.SearchInResourceReply, error)
// Command SetDocumentContent
//
// Sets given markup as the document's HTML.
SetDocumentContent(context.Context, *page.SetDocumentContentArgs) error
// Command CaptureScreenshot
//
// Capture page screenshot.
CaptureScreenshot(context.Context, *page.CaptureScreenshotArgs) (*page.CaptureScreenshotReply, error)
// Command PrintToPDF
//
// Print page as PDF.
PrintToPDF(context.Context, *page.PrintToPDFArgs) (*page.PrintToPDFReply, error)
// Command StartScreencast
//
// Starts sending each frame using the screencastFrame event.
//
// Note: This command is experimental.
StartScreencast(context.Context, *page.StartScreencastArgs) error
// Command StopScreencast
//
// Stops sending each frame in the screencastFrame.
//
// Note: This command is experimental.
StopScreencast(context.Context) error
// Command ScreencastFrameAck
//
// Acknowledges that a screencast frame has been received by the frontend.
//
// Note: This command is experimental.
ScreencastFrameAck(context.Context, *page.ScreencastFrameAckArgs) error
// Command HandleJavaScriptDialog
//
// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
HandleJavaScriptDialog(context.Context, *page.HandleJavaScriptDialogArgs) error
// Command GetAppManifest
GetAppManifest(context.Context) (*page.GetAppManifestReply, error)
// Command RequestAppBanner
//
// Note: This command is experimental.
RequestAppBanner(context.Context) error
// Command GetLayoutMetrics
//
// Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
GetLayoutMetrics(context.Context) (*page.GetLayoutMetricsReply, error)
// Command CreateIsolatedWorld
//
// Creates an isolated world for the given frame.
CreateIsolatedWorld(context.Context, *page.CreateIsolatedWorldArgs) (*page.CreateIsolatedWorldReply, error)
// Command BringToFront
//
// Brings page to front (activates tab).
BringToFront(context.Context) error
// Command SetDownloadBehavior
//
// Set the behavior when downloading a file.
//
// Note: This command is experimental.
SetDownloadBehavior(context.Context, *page.SetDownloadBehaviorArgs) error
// Event DOMContentEventFired
DOMContentEventFired(context.Context) (page.DOMContentEventFiredClient, error)
// Event LoadEventFired
LoadEventFired(context.Context) (page.LoadEventFiredClient, error)
// Event LifecycleEvent
//
// Fired for top level page lifecycle events such as navigation, load, paint, etc.
LifecycleEvent(context.Context) (page.LifecycleEventClient, error)
// Event FrameAttached
//
// Fired when frame has been attached to its parent.
FrameAttached(context.Context) (page.FrameAttachedClient, error)
// Event FrameNavigated
//
// Fired once navigation of the frame has completed. Frame is now associated with the new loader.
FrameNavigated(context.Context) (page.FrameNavigatedClient, error)
// Event FrameDetached
//
// Fired when frame has been detached from its parent.
FrameDetached(context.Context) (page.FrameDetachedClient, error)
// Event FrameStartedLoading
//
// Fired when frame has started loading.
//
// Note: This event is experimental.
FrameStartedLoading(context.Context) (page.FrameStartedLoadingClient, error)
// Event FrameStoppedLoading
//
// Fired when frame has stopped loading.
//
// Note: This event is experimental.
FrameStoppedLoading(context.Context) (page.FrameStoppedLoadingClient, error)
// Event FrameScheduledNavigation
//
// Fired when frame schedules a potential navigation.
//
// Note: This event is experimental.
FrameScheduledNavigation(context.Context) (page.FrameScheduledNavigationClient, error)
// Event FrameClearedScheduledNavigation
//
// Fired when frame no longer has a scheduled navigation.
//
// Note: This event is experimental.
FrameClearedScheduledNavigation(context.Context) (page.FrameClearedScheduledNavigationClient, error)
// Event FrameResized
//
// Note: This event is experimental.
FrameResized(context.Context) (page.FrameResizedClient, error)
// Event JavascriptDialogOpening
//
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
JavascriptDialogOpening(context.Context) (page.JavascriptDialogOpeningClient, error)
// Event JavascriptDialogClosed
//
// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
JavascriptDialogClosed(context.Context) (page.JavascriptDialogClosedClient, error)
// Event ScreencastFrame
//
// Compressed image data requested by the startScreencast.
//
// Note: This event is experimental.
ScreencastFrame(context.Context) (page.ScreencastFrameClient, error)
// Event ScreencastVisibilityChanged
//
// Fired when the page with currently enabled screencast was shown or hidden .
//
// Note: This event is experimental.
ScreencastVisibilityChanged(context.Context) (page.ScreencastVisibilityChangedClient, error)
// Event InterstitialShown
//
// Fired when interstitial page was shown
InterstitialShown(context.Context) (page.InterstitialShownClient, error)
// Event InterstitialHidden
//
// Fired when interstitial page was hidden
InterstitialHidden(context.Context) (page.InterstitialHiddenClient, error)
// Event WindowOpen
//
// Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
WindowOpen(context.Context) (page.WindowOpenClient, error)
}
// The Performance domain.
type Performance interface {
// Command Enable
//
// Enable collecting and reporting metrics.
Enable(context.Context) error
// Command Disable
//
// Disable collecting and reporting metrics.
Disable(context.Context) error
// Command GetMetrics
//
// Retrieve current values of run-time metrics.
GetMetrics(context.Context) (*performance.GetMetricsReply, error)
// Event Metrics
//
// Current values of the metrics.
Metrics(context.Context) (performance.MetricsClient, error)
}
// The Profiler domain.
type Profiler interface {
// Command Enable
Enable(context.Context) error
// Command Disable
Disable(context.Context) error
// Command SetSamplingInterval
//
// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
SetSamplingInterval(context.Context, *profiler.SetSamplingIntervalArgs) error
// Command Start
Start(context.Context) error
// Command Stop
Stop(context.Context) (*profiler.StopReply, error)
// Command StartPreciseCoverage
//
// 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.
//
// Note: This command is experimental.
StartPreciseCoverage(context.Context, *profiler.StartPreciseCoverageArgs) error
// Command StopPreciseCoverage
//
// Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
//
// Note: This command is experimental.
StopPreciseCoverage(context.Context) error
// Command TakePreciseCoverage
//
// Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
//
// Note: This command is experimental.
TakePreciseCoverage(context.Context) (*profiler.TakePreciseCoverageReply, error)
// Command GetBestEffortCoverage
//
// Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
//
// Note: This command is experimental.
GetBestEffortCoverage(context.Context) (*profiler.GetBestEffortCoverageReply, error)
// Command StartTypeProfile
//
// Enable type profile.
//
// Note: This command is experimental.
StartTypeProfile(context.Context) error
// Command StopTypeProfile
//
// Disable type profile. Disabling releases type profile data collected so far.
//
// Note: This command is experimental.
StopTypeProfile(context.Context) error
// Command TakeTypeProfile
//
// Collect type profile.
//
// Note: This command is experimental.
TakeTypeProfile(context.Context) (*profiler.TakeTypeProfileReply, error)
// Event ConsoleProfileStarted
//
// Sent when new profile recording is started using console.profile() call.
ConsoleProfileStarted(context.Context) (profiler.ConsoleProfileStartedClient, error)
// Event ConsoleProfileFinished
ConsoleProfileFinished(context.Context) (profiler.ConsoleProfileFinishedClient, error)
}
// 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.
type Runtime interface {
// Command Evaluate
//
// Evaluates expression on global object.
Evaluate(context.Context, *runtime.EvaluateArgs) (*runtime.EvaluateReply, error)
// Command AwaitPromise
//
// Add handler to promise with given promise object id.
AwaitPromise(context.Context, *runtime.AwaitPromiseArgs) (*runtime.AwaitPromiseReply, error)
// Command CallFunctionOn
//
// Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
CallFunctionOn(context.Context, *runtime.CallFunctionOnArgs) (*runtime.CallFunctionOnReply, error)
// Command GetProperties
//
// Returns properties of a given object. Object group of the result is inherited from the target object.
GetProperties(context.Context, *runtime.GetPropertiesArgs) (*runtime.GetPropertiesReply, error)
// Command ReleaseObject
//
// Releases remote object with given id.
ReleaseObject(context.Context, *runtime.ReleaseObjectArgs) error
// Command ReleaseObjectGroup
//
// Releases all remote objects that belong to a given group.
ReleaseObjectGroup(context.Context, *runtime.ReleaseObjectGroupArgs) error
// Command RunIfWaitingForDebugger
//
// Tells inspected instance to run if it was waiting for debugger to attach.
RunIfWaitingForDebugger(context.Context) error
// Command Enable
//
// 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.
Enable(context.Context) error
// Command Disable
//
// Disables reporting of execution contexts creation.
Disable(context.Context) error
// Command DiscardConsoleEntries
//
// Discards collected exceptions and console API calls.
DiscardConsoleEntries(context.Context) error
// Command SetCustomObjectFormatterEnabled
//
// Note: This command is experimental.
SetCustomObjectFormatterEnabled(context.Context, *runtime.SetCustomObjectFormatterEnabledArgs) error
// Command CompileScript
//
// Compiles expression.
CompileScript(context.Context, *runtime.CompileScriptArgs) (*runtime.CompileScriptReply, error)
// Command RunScript
//
// Runs script with given id in a given context.
RunScript(context.Context, *runtime.RunScriptArgs) (*runtime.RunScriptReply, error)
// Command QueryObjects
//
// Note: This command is experimental.
QueryObjects(context.Context, *runtime.QueryObjectsArgs) (*runtime.QueryObjectsReply, error)
// Command GlobalLexicalScopeNames
//
// Returns all let, const and class variables from global scope.
//
// Note: This command is experimental.
GlobalLexicalScopeNames(context.Context, *runtime.GlobalLexicalScopeNamesArgs) (*runtime.GlobalLexicalScopeNamesReply, error)
// Event ExecutionContextCreated
//
// Issued when new execution context is created.
ExecutionContextCreated(context.Context) (runtime.ExecutionContextCreatedClient, error)
// Event ExecutionContextDestroyed
//
// Issued when execution context is destroyed.
ExecutionContextDestroyed(context.Context) (runtime.ExecutionContextDestroyedClient, error)
// Event ExecutionContextsCleared
//
// Issued when all executionContexts were cleared in browser
ExecutionContextsCleared(context.Context) (runtime.ExecutionContextsClearedClient, error)
// Event ExceptionThrown
//
// Issued when exception was thrown and unhandled.
ExceptionThrown(context.Context) (runtime.ExceptionThrownClient, error)
// Event ExceptionRevoked
//
// Issued when unhandled exception was revoked.
ExceptionRevoked(context.Context) (runtime.ExceptionRevokedClient, error)
// Event ConsoleAPICalled
//
// Issued when console API was called.
ConsoleAPICalled(context.Context) (runtime.ConsoleAPICalledClient, error)
// Event InspectRequested
//
// Issued when object should be inspected (for example, as a result of inspect() command line API call).
InspectRequested(context.Context) (runtime.InspectRequestedClient, error)
}
// The Schema domain. Provides information about the protocol schema.
type Schema interface {
// Command GetDomains
//
// Returns supported domains.
GetDomains(context.Context) (*schema.GetDomainsReply, error)
}
// The Security domain. Security
type Security interface {
// Command Enable
//
// Enables tracking security state changes.
Enable(context.Context) error
// Command Disable
//
// Disables tracking security state changes.
Disable(context.Context) error
// Command HandleCertificateError
//
// Handles a certificate error that fired a certificateError event.
HandleCertificateError(context.Context, *security.HandleCertificateErrorArgs) error
// Command SetOverrideCertificateErrors
//
// 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.
SetOverrideCertificateErrors(context.Context, *security.SetOverrideCertificateErrorsArgs) error
// Event SecurityStateChanged
//
// The security state of the page changed.
SecurityStateChanged(context.Context) (security.StateChangedClient, error)
// Event CertificateError
//
// 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.
CertificateError(context.Context) (security.CertificateErrorClient, error)
}
// The ServiceWorker domain.
//
// Note: This domain is experimental.
type ServiceWorker interface {
// Command Enable
Enable(context.Context) error
// Command Disable
Disable(context.Context) error
// Command Unregister
Unregister(context.Context, *serviceworker.UnregisterArgs) error
// Command UpdateRegistration
UpdateRegistration(context.Context, *serviceworker.UpdateRegistrationArgs) error
// Command StartWorker
StartWorker(context.Context, *serviceworker.StartWorkerArgs) error
// Command SkipWaiting
SkipWaiting(context.Context, *serviceworker.SkipWaitingArgs) error
// Command StopWorker
StopWorker(context.Context, *serviceworker.StopWorkerArgs) error
// Command StopAllWorkers
StopAllWorkers(context.Context) error
// Command InspectWorker
InspectWorker(context.Context, *serviceworker.InspectWorkerArgs) error
// Command SetForceUpdateOnPageLoad
SetForceUpdateOnPageLoad(context.Context, *serviceworker.SetForceUpdateOnPageLoadArgs) error
// Command DeliverPushMessage
DeliverPushMessage(context.Context, *serviceworker.DeliverPushMessageArgs) error
// Command DispatchSyncEvent
DispatchSyncEvent(context.Context, *serviceworker.DispatchSyncEventArgs) error
// Event WorkerRegistrationUpdated
WorkerRegistrationUpdated(context.Context) (serviceworker.WorkerRegistrationUpdatedClient, error)
// Event WorkerVersionUpdated
WorkerVersionUpdated(context.Context) (serviceworker.WorkerVersionUpdatedClient, error)
// Event WorkerErrorReported
WorkerErrorReported(context.Context) (serviceworker.WorkerErrorReportedClient, error)
}
// The Storage domain.
//
// Note: This domain is experimental.
type Storage interface {
// Command ClearDataForOrigin
//
// Clears storage for origin.
ClearDataForOrigin(context.Context, *storage.ClearDataForOriginArgs) error
// Command GetUsageAndQuota
//
// Returns usage and quota in bytes.
GetUsageAndQuota(context.Context, *storage.GetUsageAndQuotaArgs) (*storage.GetUsageAndQuotaReply, error)
// Command TrackCacheStorageForOrigin
//
// Registers origin to be notified when an update occurs to its cache storage list.
TrackCacheStorageForOrigin(context.Context, *storage.TrackCacheStorageForOriginArgs) error
// Command UntrackCacheStorageForOrigin
//
// Unregisters origin from receiving notifications for cache storage.
UntrackCacheStorageForOrigin(context.Context, *storage.UntrackCacheStorageForOriginArgs) error
// Command TrackIndexedDBForOrigin
//
// Registers origin to be notified when an update occurs to its IndexedDB.
TrackIndexedDBForOrigin(context.Context, *storage.TrackIndexedDBForOriginArgs) error
// Command UntrackIndexedDBForOrigin
//
// Unregisters origin from receiving notifications for IndexedDB.
UntrackIndexedDBForOrigin(context.Context, *storage.UntrackIndexedDBForOriginArgs) error
// Event CacheStorageListUpdated
//
// A cache has been added/deleted.
CacheStorageListUpdated(context.Context) (storage.CacheStorageListUpdatedClient, error)
// Event CacheStorageContentUpdated
//
// A cache's contents have been modified.
CacheStorageContentUpdated(context.Context) (storage.CacheStorageContentUpdatedClient, error)
// Event IndexedDBListUpdated
//
// The origin's IndexedDB database list has been modified.
IndexedDBListUpdated(context.Context) (storage.IndexedDBListUpdatedClient, error)
// Event IndexedDBContentUpdated
//
// The origin's IndexedDB object store has been modified.
IndexedDBContentUpdated(context.Context) (storage.IndexedDBContentUpdatedClient, error)
}
// The SystemInfo domain. The SystemInfo domain defines methods and events for querying low-level system information.
//
// Note: This domain is experimental.
type SystemInfo interface {
// Command GetInfo
//
// Returns information about the system.
GetInfo(context.Context) (*systeminfo.GetInfoReply, error)
}
// The Target domain. Supports additional targets discovery and allows to attach to them.
type Target interface {
// Command SetDiscoverTargets
//
// Controls whether to discover available targets and notify via targetCreated/targetInfoChanged/targetDestroyed events.
SetDiscoverTargets(context.Context, *target.SetDiscoverTargetsArgs) error
// Command SetAutoAttach
//
// 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.
//
// Note: This command is experimental.
SetAutoAttach(context.Context, *target.SetAutoAttachArgs) error
// Command SetAttachToFrames
//
// Note: This command is experimental.
SetAttachToFrames(context.Context, *target.SetAttachToFramesArgs) error
// Command SetRemoteLocations
//
// Enables target discovery for the specified locations, when setDiscoverTargets was set to true.
//
// Note: This command is experimental.
SetRemoteLocations(context.Context, *target.SetRemoteLocationsArgs) error
// Command SendMessageToTarget
//
// Sends protocol message over session with given id.
SendMessageToTarget(context.Context, *target.SendMessageToTargetArgs) error
// Command GetTargetInfo
//
// Returns information about a target.
//
// Note: This command is experimental.
GetTargetInfo(context.Context, *target.GetTargetInfoArgs) (*target.GetTargetInfoReply, error)
// Command ActivateTarget
//
// Activates (focuses) the target.
ActivateTarget(context.Context, *target.ActivateTargetArgs) error
// Command CloseTarget
//
// Closes the target. If the target is a page that gets closed too.
CloseTarget(context.Context, *target.CloseTargetArgs) (*target.CloseTargetReply, error)
// Command AttachToTarget
//
// Attaches to the target with given id.
AttachToTarget(context.Context, *target.AttachToTargetArgs) (*target.AttachToTargetReply, error)
// Command DetachFromTarget
//
// Detaches session with given id.
DetachFromTarget(context.Context, *target.DetachFromTargetArgs) error
// Command CreateBrowserContext
//
// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
//
// Note: This command is experimental.
CreateBrowserContext(context.Context) (*target.CreateBrowserContextReply, error)
// Command DisposeBrowserContext
//
// Deletes a BrowserContext, will fail of any open page uses it.
//
// Note: This command is experimental.
DisposeBrowserContext(context.Context, *target.DisposeBrowserContextArgs) (*target.DisposeBrowserContextReply, error)
// Command CreateTarget
//
// Creates a new page.
CreateTarget(context.Context, *target.CreateTargetArgs) (*target.CreateTargetReply, error)
// Command GetTargets
//
// Retrieves a list of available targets.
GetTargets(context.Context) (*target.GetTargetsReply, error)
// Event TargetCreated
//
// Issued when a possible inspection target is created.
TargetCreated(context.Context) (target.CreatedClient, error)
// Event TargetInfoChanged
//
// Issued when some information about a target has changed. This only happens between targetCreated and targetDestroyed.
TargetInfoChanged(context.Context) (target.InfoChangedClient, error)
// Event TargetDestroyed
//
// Issued when a target is destroyed.
TargetDestroyed(context.Context) (target.DestroyedClient, error)
// Event AttachedToTarget
//
// Issued when attached to target because of auto-attach or attachToTarget command.
//
// Note: This event is experimental.
AttachedToTarget(context.Context) (target.AttachedToTargetClient, error)
// Event DetachedFromTarget
//
// Issued when detached from target for any reason (including detachFromTarget command). Can be issued multiple times per target if multiple sessions have been attached to it.
//
// Note: This event is experimental.
DetachedFromTarget(context.Context) (target.DetachedFromTargetClient, error)
// Event ReceivedMessageFromTarget
//
// Notifies about a new protocol message received from the session (as reported in attachedToTarget event).
ReceivedMessageFromTarget(context.Context) (target.ReceivedMessageFromTargetClient, error)
}
// The Tethering domain. The Tethering domain defines methods and events for browser port binding.
//
// Note: This domain is experimental.
type Tethering interface {
// Command Bind
//
// Request browser port binding.
Bind(context.Context, *tethering.BindArgs) error
// Command Unbind
//
// Request browser port unbinding.
Unbind(context.Context, *tethering.UnbindArgs) error
// Event Accepted
//
// Informs that port was successfully bound and got a specified connection id.
Accepted(context.Context) (tethering.AcceptedClient, error)
}
// The Tracing domain.
//
// Note: This domain is experimental.
type Tracing interface {
// Command Start
//
// Start trace events collection.
Start(context.Context, *tracing.StartArgs) error
// Command End
//
// Stop trace events collection.
End(context.Context) error
// Command GetCategories
//
// Gets supported tracing categories.
GetCategories(context.Context) (*tracing.GetCategoriesReply, error)
// Command RequestMemoryDump
//
// Request a global memory dump.
RequestMemoryDump(context.Context) (*tracing.RequestMemoryDumpReply, error)
// Command RecordClockSyncMarker
//
// Record a clock sync marker in the trace.
RecordClockSyncMarker(context.Context, *tracing.RecordClockSyncMarkerArgs) error
// Event DataCollected
//
// 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.
DataCollected(context.Context) (tracing.DataCollectedClient, error)
// Event TracingComplete
//
// Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
TracingComplete(context.Context) (tracing.CompleteClient, error)
// Event BufferUsage
BufferUsage(context.Context) (tracing.BufferUsageClient, error)
}