Documentation
¶
Overview ¶
This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> 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.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>
Index ¶
- type AttributeModifiedEvent
- type AttributeRemovedEvent
- type BackendNode
- type BackendNodeId
- type BoxModel
- type CharacterDataModifiedEvent
- type ChildNodeCountUpdatedEvent
- type ChildNodeInsertedEvent
- type ChildNodeRemovedEvent
- type Client
- func (d *Client) CollectClassNamesFromSubtree() *CollectClassNamesFromSubtreeRequest
- func (d *Client) CopyTo() *CopyToRequest
- func (d *Client) Disable() *DisableRequest
- func (d *Client) DiscardSearchResults() *DiscardSearchResultsRequest
- func (d *Client) Enable() *EnableRequest
- func (d *Client) Focus() *FocusRequest
- func (d *Client) GetAttributes() *GetAttributesRequest
- func (d *Client) GetBoxModel() *GetBoxModelRequest
- func (d *Client) GetDocument() *GetDocumentRequest
- func (d *Client) GetFlattenedDocument() *GetFlattenedDocumentRequest
- func (d *Client) GetNodeForLocation() *GetNodeForLocationRequest
- func (d *Client) GetOuterHTML() *GetOuterHTMLRequest
- func (d *Client) GetRelayoutBoundary() *GetRelayoutBoundaryRequest
- func (d *Client) GetSearchResults() *GetSearchResultsRequest
- func (d *Client) HideHighlight() *HideHighlightRequest
- func (d *Client) HighlightNode() *HighlightNodeRequest
- func (d *Client) HighlightRect() *HighlightRectRequest
- func (d *Client) MarkUndoableState() *MarkUndoableStateRequest
- func (d *Client) MoveTo() *MoveToRequest
- func (d *Client) PerformSearch() *PerformSearchRequest
- func (d *Client) PushNodeByPathToFrontend() *PushNodeByPathToFrontendRequest
- func (d *Client) PushNodesByBackendIdsToFrontend() *PushNodesByBackendIdsToFrontendRequest
- func (d *Client) QuerySelector() *QuerySelectorRequest
- func (d *Client) QuerySelectorAll() *QuerySelectorAllRequest
- func (d *Client) Redo() *RedoRequest
- func (d *Client) RemoveAttribute() *RemoveAttributeRequest
- func (d *Client) RemoveNode() *RemoveNodeRequest
- func (d *Client) RequestChildNodes() *RequestChildNodesRequest
- func (d *Client) RequestNode() *RequestNodeRequest
- func (d *Client) ResolveNode() *ResolveNodeRequest
- func (d *Client) SetAttributeValue() *SetAttributeValueRequest
- func (d *Client) SetAttributesAsText() *SetAttributesAsTextRequest
- func (d *Client) SetFileInputFiles() *SetFileInputFilesRequest
- func (d *Client) SetInspectedNode() *SetInspectedNodeRequest
- func (d *Client) SetNodeName() *SetNodeNameRequest
- func (d *Client) SetNodeValue() *SetNodeValueRequest
- func (d *Client) SetOuterHTML() *SetOuterHTMLRequest
- func (d *Client) Undo() *UndoRequest
- type CollectClassNamesFromSubtreeRequest
- type CollectClassNamesFromSubtreeResult
- type CopyToRequest
- type CopyToResult
- type DisableRequest
- type DiscardSearchResultsRequest
- type DistributedNodesUpdatedEvent
- type DocumentUpdatedEvent
- type EnableRequest
- type FocusRequest
- type GetAttributesRequest
- type GetAttributesResult
- type GetBoxModelRequest
- type GetBoxModelResult
- type GetDocumentRequest
- type GetDocumentResult
- type GetFlattenedDocumentRequest
- type GetFlattenedDocumentResult
- type GetNodeForLocationRequest
- func (r *GetNodeForLocationRequest) Do() (*GetNodeForLocationResult, error)
- func (r *GetNodeForLocationRequest) IncludeUserAgentShadowDOM(v bool) *GetNodeForLocationRequest
- func (r *GetNodeForLocationRequest) X(v int) *GetNodeForLocationRequest
- func (r *GetNodeForLocationRequest) Y(v int) *GetNodeForLocationRequest
- type GetNodeForLocationResult
- type GetOuterHTMLRequest
- type GetOuterHTMLResult
- type GetRelayoutBoundaryRequest
- type GetRelayoutBoundaryResult
- type GetSearchResultsRequest
- type GetSearchResultsResult
- type HideHighlightRequest
- type HighlightNodeRequest
- type HighlightRectRequest
- type InlineStyleInvalidatedEvent
- type MarkUndoableStateRequest
- type MoveToRequest
- type MoveToResult
- type Node
- type NodeId
- type PerformSearchRequest
- type PerformSearchResult
- type PseudoElementAddedEvent
- type PseudoElementRemovedEvent
- type PseudoType
- type PushNodeByPathToFrontendRequest
- type PushNodeByPathToFrontendResult
- type PushNodesByBackendIdsToFrontendRequest
- type PushNodesByBackendIdsToFrontendResult
- type Quad
- type QuerySelectorAllRequest
- type QuerySelectorAllResult
- type QuerySelectorRequest
- type QuerySelectorResult
- type RGBA
- type Rect
- type RedoRequest
- type RemoveAttributeRequest
- type RemoveNodeRequest
- type RequestChildNodesRequest
- type RequestNodeRequest
- type RequestNodeResult
- type ResolveNodeRequest
- type ResolveNodeResult
- type SetAttributeValueRequest
- type SetAttributesAsTextRequest
- type SetChildNodesEvent
- type SetFileInputFilesRequest
- type SetInspectedNodeRequest
- type SetNodeNameRequest
- type SetNodeNameResult
- type SetNodeValueRequest
- type SetOuterHTMLRequest
- type ShadowRootPoppedEvent
- type ShadowRootPushedEvent
- type ShadowRootType
- type ShapeOutsideInfo
- type UndoRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeModifiedEvent ¶
type AttributeModifiedEvent struct { // Id of the node that has changed. NodeId NodeId `json:"nodeId"` // Attribute name. Name string `json:"name"` // Attribute value. Value string `json:"value"` }
Fired when <code>Element</code>'s attribute is modified.
type AttributeRemovedEvent ¶
type AttributeRemovedEvent struct { // Id of the node that has changed. NodeId NodeId `json:"nodeId"` // A ttribute name. Name string `json:"name"` }
Fired when <code>Element</code>'s attribute is removed.
type BackendNode ¶
type BackendNode struct { // <code>Node</code>'s nodeType. NodeType int `json:"nodeType"` // <code>Node</code>'s nodeName. NodeName string `json:"nodeName"` BackendNodeId BackendNodeId `json:"backendNodeId"` }
type BackendNodeId ¶
type BackendNodeId int
type BoxModel ¶
type BoxModel struct { // Content box Content Quad `json:"content"` // Padding box Padding Quad `json:"padding"` // Border box Border Quad `json:"border"` // Margin box Margin Quad `json:"margin"` // Node width Width int `json:"width"` // Node height Height int `json:"height"` // Shape outside coordinates (optional) ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` }
type CharacterDataModifiedEvent ¶
type CharacterDataModifiedEvent struct { // Id of the node that has changed. NodeId NodeId `json:"nodeId"` // New text value. CharacterData string `json:"characterData"` }
Mirrors <code>DOMCharacterDataModified</code> event.
type ChildNodeCountUpdatedEvent ¶
type ChildNodeCountUpdatedEvent struct { // Id of the node that has changed. NodeId NodeId `json:"nodeId"` // New node count. ChildNodeCount int `json:"childNodeCount"` }
Fired when <code>Container</code>'s child node count has changed.
type ChildNodeInsertedEvent ¶
type ChildNodeInsertedEvent struct { // Id of the node that has changed. ParentNodeId NodeId `json:"parentNodeId"` // If of the previous siblint. PreviousNodeId NodeId `json:"previousNodeId"` // Inserted node data. Node *Node `json:"node"` }
Mirrors <code>DOMNodeInserted</code> event.
type ChildNodeRemovedEvent ¶
type ChildNodeRemovedEvent struct { // Parent id. ParentNodeId NodeId `json:"parentNodeId"` // Id of the node that has been removed. NodeId NodeId `json:"nodeId"` }
Mirrors <code>DOMNodeRemoved</code> event.
type Client ¶
This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> 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.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>
func (*Client) CollectClassNamesFromSubtree ¶
func (d *Client) CollectClassNamesFromSubtree() *CollectClassNamesFromSubtreeRequest
Collects class names for the node with given id and all of it's child nodes. (experimental)
func (*Client) CopyTo ¶
func (d *Client) CopyTo() *CopyToRequest
Creates a deep copy of the specified node and places it into the target container before the given anchor. (experimental)
func (*Client) Disable ¶
func (d *Client) Disable() *DisableRequest
Disables DOM agent for the given page.
func (*Client) DiscardSearchResults ¶
func (d *Client) DiscardSearchResults() *DiscardSearchResultsRequest
Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search. (experimental)
func (*Client) Enable ¶
func (d *Client) Enable() *EnableRequest
Enables DOM agent for the given page.
func (*Client) Focus ¶
func (d *Client) Focus() *FocusRequest
Focuses the given element. (experimental)
func (*Client) GetAttributes ¶
func (d *Client) GetAttributes() *GetAttributesRequest
Returns attributes for the specified node.
func (*Client) GetBoxModel ¶
func (d *Client) GetBoxModel() *GetBoxModelRequest
Returns boxes for the currently selected nodes. (experimental)
func (*Client) GetDocument ¶
func (d *Client) GetDocument() *GetDocumentRequest
Returns the root DOM node (and optionally the subtree) to the caller.
func (*Client) GetFlattenedDocument ¶
func (d *Client) GetFlattenedDocument() *GetFlattenedDocumentRequest
Returns the root DOM node (and optionally the subtree) to the caller.
func (*Client) GetNodeForLocation ¶
func (d *Client) GetNodeForLocation() *GetNodeForLocationRequest
Returns node id at given location. (experimental)
func (*Client) GetOuterHTML ¶
func (d *Client) GetOuterHTML() *GetOuterHTMLRequest
Returns node's HTML markup.
func (*Client) GetRelayoutBoundary ¶
func (d *Client) GetRelayoutBoundary() *GetRelayoutBoundaryRequest
Returns the id of the nearest ancestor that is a relayout boundary. (experimental)
func (*Client) GetSearchResults ¶
func (d *Client) GetSearchResults() *GetSearchResultsRequest
Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier. (experimental)
func (*Client) HideHighlight ¶
func (d *Client) HideHighlight() *HideHighlightRequest
Hides any highlight.
func (*Client) HighlightNode ¶
func (d *Client) HighlightNode() *HighlightNodeRequest
Highlights DOM node.
func (*Client) HighlightRect ¶
func (d *Client) HighlightRect() *HighlightRectRequest
Highlights given rectangle.
func (*Client) MarkUndoableState ¶
func (d *Client) MarkUndoableState() *MarkUndoableStateRequest
Marks last undoable state. (experimental)
func (*Client) MoveTo ¶
func (d *Client) MoveTo() *MoveToRequest
Moves node into the new container, places it before the given anchor.
func (*Client) PerformSearch ¶
func (d *Client) PerformSearch() *PerformSearchRequest
Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session. (experimental)
func (*Client) PushNodeByPathToFrontend ¶
func (d *Client) PushNodeByPathToFrontend() *PushNodeByPathToFrontendRequest
Requests that the node is sent to the caller given its path. // FIXME, use XPath (experimental)
func (*Client) PushNodesByBackendIdsToFrontend ¶
func (d *Client) PushNodesByBackendIdsToFrontend() *PushNodesByBackendIdsToFrontendRequest
Requests that a batch of nodes is sent to the caller given their backend node ids. (experimental)
func (*Client) QuerySelector ¶
func (d *Client) QuerySelector() *QuerySelectorRequest
Executes <code>querySelector</code> on a given node.
func (*Client) QuerySelectorAll ¶
func (d *Client) QuerySelectorAll() *QuerySelectorAllRequest
Executes <code>querySelectorAll</code> on a given node.
func (*Client) Redo ¶
func (d *Client) Redo() *RedoRequest
Re-does the last undone action. (experimental)
func (*Client) RemoveAttribute ¶
func (d *Client) RemoveAttribute() *RemoveAttributeRequest
Removes attribute with given name from an element with given id.
func (*Client) RemoveNode ¶
func (d *Client) RemoveNode() *RemoveNodeRequest
Removes node with given id.
func (*Client) RequestChildNodes ¶
func (d *Client) RequestChildNodes() *RequestChildNodesRequest
Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth.
func (*Client) RequestNode ¶
func (d *Client) RequestNode() *RequestNodeRequest
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 <code>setChildNodes</code> notifications.
func (*Client) ResolveNode ¶
func (d *Client) ResolveNode() *ResolveNodeRequest
Resolves JavaScript node object for given node id.
func (*Client) SetAttributeValue ¶
func (d *Client) SetAttributeValue() *SetAttributeValueRequest
Sets attribute for an element with given id.
func (*Client) SetAttributesAsText ¶
func (d *Client) SetAttributesAsText() *SetAttributesAsTextRequest
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 (*Client) SetFileInputFiles ¶
func (d *Client) SetFileInputFiles() *SetFileInputFilesRequest
Sets files for the given file input element. (experimental)
func (*Client) SetInspectedNode ¶
func (d *Client) SetInspectedNode() *SetInspectedNodeRequest
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). (experimental)
func (*Client) SetNodeName ¶
func (d *Client) SetNodeName() *SetNodeNameRequest
Sets node name for a node with given id.
func (*Client) SetNodeValue ¶
func (d *Client) SetNodeValue() *SetNodeValueRequest
Sets node value for a node with given id.
func (*Client) SetOuterHTML ¶
func (d *Client) SetOuterHTML() *SetOuterHTMLRequest
Sets node HTML markup, returns new node id.
func (*Client) Undo ¶
func (d *Client) Undo() *UndoRequest
Undoes the last performed action. (experimental)
type CollectClassNamesFromSubtreeRequest ¶
type CollectClassNamesFromSubtreeRequest struct {
// contains filtered or unexported fields
}
func (*CollectClassNamesFromSubtreeRequest) Do ¶
func (r *CollectClassNamesFromSubtreeRequest) Do() (*CollectClassNamesFromSubtreeResult, error)
func (*CollectClassNamesFromSubtreeRequest) NodeId ¶
func (r *CollectClassNamesFromSubtreeRequest) NodeId(v NodeId) *CollectClassNamesFromSubtreeRequest
Id of the node to collect class names.
type CollectClassNamesFromSubtreeResult ¶
type CollectClassNamesFromSubtreeResult struct { // Class name list. ClassNames []string `json:"classNames"` }
type CopyToRequest ¶
type CopyToRequest struct {
// contains filtered or unexported fields
}
func (*CopyToRequest) Do ¶
func (r *CopyToRequest) Do() (*CopyToResult, error)
func (*CopyToRequest) InsertBeforeNodeId ¶
func (r *CopyToRequest) InsertBeforeNodeId(v NodeId) *CopyToRequest
Drop the copy before this node (if absent, the copy becomes the last child of <code>targetNodeId</code>). (optional)
func (*CopyToRequest) NodeId ¶
func (r *CopyToRequest) NodeId(v NodeId) *CopyToRequest
Id of the node to copy.
func (*CopyToRequest) TargetNodeId ¶
func (r *CopyToRequest) TargetNodeId(v NodeId) *CopyToRequest
Id of the element to drop the copy into.
type CopyToResult ¶
type CopyToResult struct { // Id of the node clone. NodeId NodeId `json:"nodeId"` }
type DisableRequest ¶
type DisableRequest struct {
// contains filtered or unexported fields
}
func (*DisableRequest) Do ¶
func (r *DisableRequest) Do() error
type DiscardSearchResultsRequest ¶
type DiscardSearchResultsRequest struct {
// contains filtered or unexported fields
}
func (*DiscardSearchResultsRequest) Do ¶
func (r *DiscardSearchResultsRequest) Do() error
func (*DiscardSearchResultsRequest) SearchId ¶
func (r *DiscardSearchResultsRequest) SearchId(v string) *DiscardSearchResultsRequest
Unique search session identifier.
type DistributedNodesUpdatedEvent ¶
type DistributedNodesUpdatedEvent struct { // Insertion point where distrubuted nodes were updated. InsertionPointId NodeId `json:"insertionPointId"` // Distributed nodes for given insertion point. DistributedNodes []*BackendNode `json:"distributedNodes"` }
Called when distrubution is changed. (experimental)
type DocumentUpdatedEvent ¶
type DocumentUpdatedEvent struct { }
Fired when <code>Document</code> has been totally updated. Node ids are no longer valid.
type EnableRequest ¶
type EnableRequest struct {
// contains filtered or unexported fields
}
func (*EnableRequest) Do ¶
func (r *EnableRequest) Do() error
type FocusRequest ¶
type FocusRequest struct {
// contains filtered or unexported fields
}
func (*FocusRequest) Do ¶
func (r *FocusRequest) Do() error
func (*FocusRequest) NodeId ¶
func (r *FocusRequest) NodeId(v NodeId) *FocusRequest
Id of the node to focus.
type GetAttributesRequest ¶
type GetAttributesRequest struct {
// contains filtered or unexported fields
}
func (*GetAttributesRequest) Do ¶
func (r *GetAttributesRequest) Do() (*GetAttributesResult, error)
func (*GetAttributesRequest) NodeId ¶
func (r *GetAttributesRequest) NodeId(v NodeId) *GetAttributesRequest
Id of the node to retrieve attibutes for.
type GetAttributesResult ¶
type GetAttributesResult struct { // An interleaved array of node attribute names and values. Attributes []string `json:"attributes"` }
type GetBoxModelRequest ¶
type GetBoxModelRequest struct {
// contains filtered or unexported fields
}
func (*GetBoxModelRequest) Do ¶
func (r *GetBoxModelRequest) Do() (*GetBoxModelResult, error)
func (*GetBoxModelRequest) NodeId ¶
func (r *GetBoxModelRequest) NodeId(v NodeId) *GetBoxModelRequest
Id of the node to get box model for.
type GetBoxModelResult ¶
type GetBoxModelResult struct { // Box model for the node. Model *BoxModel `json:"model"` }
type GetDocumentRequest ¶
type GetDocumentRequest struct {
// contains filtered or unexported fields
}
func (*GetDocumentRequest) Depth ¶
func (r *GetDocumentRequest) Depth(v int) *GetDocumentRequest
The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional, experimental)
func (*GetDocumentRequest) Do ¶
func (r *GetDocumentRequest) Do() (*GetDocumentResult, error)
func (*GetDocumentRequest) Pierce ¶
func (r *GetDocumentRequest) Pierce(v bool) *GetDocumentRequest
Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional, experimental)
type GetDocumentResult ¶
type GetDocumentResult struct { // Resulting node. Root *Node `json:"root"` }
type GetFlattenedDocumentRequest ¶
type GetFlattenedDocumentRequest struct {
// contains filtered or unexported fields
}
func (*GetFlattenedDocumentRequest) Depth ¶
func (r *GetFlattenedDocumentRequest) Depth(v int) *GetFlattenedDocumentRequest
The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional, experimental)
func (*GetFlattenedDocumentRequest) Do ¶
func (r *GetFlattenedDocumentRequest) Do() (*GetFlattenedDocumentResult, error)
func (*GetFlattenedDocumentRequest) Pierce ¶
func (r *GetFlattenedDocumentRequest) Pierce(v bool) *GetFlattenedDocumentRequest
Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional, experimental)
type GetFlattenedDocumentResult ¶
type GetFlattenedDocumentResult struct { // Resulting node. Nodes []*Node `json:"nodes"` }
type GetNodeForLocationRequest ¶
type GetNodeForLocationRequest struct {
// contains filtered or unexported fields
}
func (*GetNodeForLocationRequest) Do ¶
func (r *GetNodeForLocationRequest) Do() (*GetNodeForLocationResult, error)
func (*GetNodeForLocationRequest) IncludeUserAgentShadowDOM ¶
func (r *GetNodeForLocationRequest) IncludeUserAgentShadowDOM(v bool) *GetNodeForLocationRequest
False to skip to the nearest non-UA shadow root ancestor (default: false). (optional)
func (*GetNodeForLocationRequest) X ¶
func (r *GetNodeForLocationRequest) X(v int) *GetNodeForLocationRequest
X coordinate.
func (*GetNodeForLocationRequest) Y ¶
func (r *GetNodeForLocationRequest) Y(v int) *GetNodeForLocationRequest
Y coordinate.
type GetNodeForLocationResult ¶
type GetNodeForLocationResult struct { // Id of the node at given coordinates. NodeId NodeId `json:"nodeId"` }
type GetOuterHTMLRequest ¶
type GetOuterHTMLRequest struct {
// contains filtered or unexported fields
}
func (*GetOuterHTMLRequest) Do ¶
func (r *GetOuterHTMLRequest) Do() (*GetOuterHTMLResult, error)
func (*GetOuterHTMLRequest) NodeId ¶
func (r *GetOuterHTMLRequest) NodeId(v NodeId) *GetOuterHTMLRequest
Id of the node to get markup for.
type GetOuterHTMLResult ¶
type GetOuterHTMLResult struct { // Outer HTML markup. OuterHTML string `json:"outerHTML"` }
type GetRelayoutBoundaryRequest ¶
type GetRelayoutBoundaryRequest struct {
// contains filtered or unexported fields
}
func (*GetRelayoutBoundaryRequest) Do ¶
func (r *GetRelayoutBoundaryRequest) Do() (*GetRelayoutBoundaryResult, error)
func (*GetRelayoutBoundaryRequest) NodeId ¶
func (r *GetRelayoutBoundaryRequest) NodeId(v NodeId) *GetRelayoutBoundaryRequest
Id of the node.
type GetRelayoutBoundaryResult ¶
type GetRelayoutBoundaryResult struct { // Relayout boundary node id for the given node. NodeId NodeId `json:"nodeId"` }
type GetSearchResultsRequest ¶
type GetSearchResultsRequest struct {
// contains filtered or unexported fields
}
func (*GetSearchResultsRequest) Do ¶
func (r *GetSearchResultsRequest) Do() (*GetSearchResultsResult, error)
func (*GetSearchResultsRequest) FromIndex ¶
func (r *GetSearchResultsRequest) FromIndex(v int) *GetSearchResultsRequest
Start index of the search result to be returned.
func (*GetSearchResultsRequest) SearchId ¶
func (r *GetSearchResultsRequest) SearchId(v string) *GetSearchResultsRequest
Unique search session identifier.
func (*GetSearchResultsRequest) ToIndex ¶
func (r *GetSearchResultsRequest) ToIndex(v int) *GetSearchResultsRequest
End index of the search result to be returned.
type GetSearchResultsResult ¶
type GetSearchResultsResult struct { // Ids of the search result nodes. NodeIds []NodeId `json:"nodeIds"` }
type HideHighlightRequest ¶
type HideHighlightRequest struct {
// contains filtered or unexported fields
}
func (*HideHighlightRequest) Do ¶
func (r *HideHighlightRequest) Do() error
type HighlightNodeRequest ¶
type HighlightNodeRequest struct {
// contains filtered or unexported fields
}
func (*HighlightNodeRequest) Do ¶
func (r *HighlightNodeRequest) Do() error
type HighlightRectRequest ¶
type HighlightRectRequest struct {
// contains filtered or unexported fields
}
func (*HighlightRectRequest) Do ¶
func (r *HighlightRectRequest) Do() error
type InlineStyleInvalidatedEvent ¶
type InlineStyleInvalidatedEvent struct { // Ids of the nodes for which the inline styles have been invalidated. NodeIds []NodeId `json:"nodeIds"` }
Fired when <code>Element</code>'s inline style is modified via a CSS property modification. (experimental)
type MarkUndoableStateRequest ¶
type MarkUndoableStateRequest struct {
// contains filtered or unexported fields
}
func (*MarkUndoableStateRequest) Do ¶
func (r *MarkUndoableStateRequest) Do() error
type MoveToRequest ¶
type MoveToRequest struct {
// contains filtered or unexported fields
}
func (*MoveToRequest) Do ¶
func (r *MoveToRequest) Do() (*MoveToResult, error)
func (*MoveToRequest) InsertBeforeNodeId ¶
func (r *MoveToRequest) InsertBeforeNodeId(v NodeId) *MoveToRequest
Drop node before this one (if absent, the moved node becomes the last child of <code>targetNodeId</code>). (optional)
func (*MoveToRequest) NodeId ¶
func (r *MoveToRequest) NodeId(v NodeId) *MoveToRequest
Id of the node to move.
func (*MoveToRequest) TargetNodeId ¶
func (r *MoveToRequest) TargetNodeId(v NodeId) *MoveToRequest
Id of the element to drop the moved node into.
type MoveToResult ¶
type MoveToResult struct { // New id of the moved node. NodeId NodeId `json:"nodeId"` }
type Node ¶
type Node struct { // Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client. NodeId NodeId `json:"nodeId"` // The id of the parent node if any. (optional, experimental) ParentId NodeId `json:"parentId,omitempty"` // The BackendNodeId for this node. BackendNodeId BackendNodeId `json:"backendNodeId"` // <code>Node</code>'s nodeType. NodeType int `json:"nodeType"` // <code>Node</code>'s nodeName. NodeName string `json:"nodeName"` // <code>Node</code>'s localName. LocalName string `json:"localName"` // <code>Node</code>'s nodeValue. NodeValue string `json:"nodeValue"` // Child count for <code>Container</code> nodes. (optional) ChildNodeCount int `json:"childNodeCount,omitempty"` // Child nodes of this node when requested with children. (optional) Children []*Node `json:"children,omitempty"` // Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>. (optional) Attributes []string `json:"attributes,omitempty"` // Document URL that <code>Document</code> or <code>FrameOwner</code> node points to. (optional) DocumentURL string `json:"documentURL,omitempty"` // Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion. (optional, experimental) BaseURL string `json:"baseURL,omitempty"` // <code>DocumentType</code>'s publicId. (optional) PublicId string `json:"publicId,omitempty"` // <code>DocumentType</code>'s systemId. (optional) SystemId string `json:"systemId,omitempty"` // <code>DocumentType</code>'s internalSubset. (optional) InternalSubset string `json:"internalSubset,omitempty"` // <code>Document</code>'s XML version in case of XML documents. (optional) XmlVersion string `json:"xmlVersion,omitempty"` // <code>Attr</code>'s name. (optional) Name string `json:"name,omitempty"` // <code>Attr</code>'s value. (optional) Value string `json:"value,omitempty"` // Pseudo element type for this node. (optional) PseudoType PseudoType `json:"pseudoType,omitempty"` // Shadow root type. (optional) ShadowRootType ShadowRootType `json:"shadowRootType,omitempty"` // Frame ID for frame owner elements. (optional, experimental) FrameId string `json:"frameId,omitempty"` // Content document for frame owner elements. (optional) ContentDocument *Node `json:"contentDocument,omitempty"` // Shadow root list for given element host. (optional, experimental) ShadowRoots []*Node `json:"shadowRoots,omitempty"` // Content document fragment for template elements. (optional, experimental) TemplateContent *Node `json:"templateContent,omitempty"` // Pseudo elements associated with this node. (optional, experimental) PseudoElements []*Node `json:"pseudoElements,omitempty"` // Import document for the HTMLImport links. (optional) ImportedDocument *Node `json:"importedDocument,omitempty"` // Distributed nodes for given insertion point. (optional, experimental) DistributedNodes []*BackendNode `json:"distributedNodes,omitempty"` // Whether the node is SVG. (optional, experimental) IsSVG bool `json:"isSVG,omitempty"` }
type PerformSearchRequest ¶
type PerformSearchRequest struct {
// contains filtered or unexported fields
}
func (*PerformSearchRequest) Do ¶
func (r *PerformSearchRequest) Do() (*PerformSearchResult, error)
func (*PerformSearchRequest) IncludeUserAgentShadowDOM ¶
func (r *PerformSearchRequest) IncludeUserAgentShadowDOM(v bool) *PerformSearchRequest
True to search in user agent shadow DOM. (optional, experimental)
func (*PerformSearchRequest) Query ¶
func (r *PerformSearchRequest) Query(v string) *PerformSearchRequest
Plain text or query selector or XPath search query.
type PerformSearchResult ¶
type PseudoElementAddedEvent ¶
type PseudoElementAddedEvent struct { // Pseudo element's parent element id. ParentId NodeId `json:"parentId"` // The added pseudo element. PseudoElement *Node `json:"pseudoElement"` }
Called when a pseudo element is added to an element. (experimental)
type PseudoElementRemovedEvent ¶
type PseudoElementRemovedEvent struct { // Pseudo element's parent element id. ParentId NodeId `json:"parentId"` // The removed pseudo element id. PseudoElementId NodeId `json:"pseudoElementId"` }
Called when a pseudo element is removed from an element. (experimental)
type PseudoType ¶
type PseudoType string
type PushNodeByPathToFrontendRequest ¶
type PushNodeByPathToFrontendRequest struct {
// contains filtered or unexported fields
}
func (*PushNodeByPathToFrontendRequest) Do ¶
func (r *PushNodeByPathToFrontendRequest) Do() (*PushNodeByPathToFrontendResult, error)
func (*PushNodeByPathToFrontendRequest) Path ¶
func (r *PushNodeByPathToFrontendRequest) Path(v string) *PushNodeByPathToFrontendRequest
Path to node in the proprietary format.
type PushNodeByPathToFrontendResult ¶
type PushNodeByPathToFrontendResult struct { // Id of the node for given path. NodeId NodeId `json:"nodeId"` }
type PushNodesByBackendIdsToFrontendRequest ¶
type PushNodesByBackendIdsToFrontendRequest struct {
// contains filtered or unexported fields
}
func (*PushNodesByBackendIdsToFrontendRequest) BackendNodeIds ¶
func (r *PushNodesByBackendIdsToFrontendRequest) BackendNodeIds(v []BackendNodeId) *PushNodesByBackendIdsToFrontendRequest
The array of backend node ids.
func (*PushNodesByBackendIdsToFrontendRequest) Do ¶
func (r *PushNodesByBackendIdsToFrontendRequest) Do() (*PushNodesByBackendIdsToFrontendResult, error)
type PushNodesByBackendIdsToFrontendResult ¶
type PushNodesByBackendIdsToFrontendResult struct { // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. NodeIds []NodeId `json:"nodeIds"` }
type QuerySelectorAllRequest ¶
type QuerySelectorAllRequest struct {
// contains filtered or unexported fields
}
func (*QuerySelectorAllRequest) Do ¶
func (r *QuerySelectorAllRequest) Do() (*QuerySelectorAllResult, error)
func (*QuerySelectorAllRequest) NodeId ¶
func (r *QuerySelectorAllRequest) NodeId(v NodeId) *QuerySelectorAllRequest
Id of the node to query upon.
func (*QuerySelectorAllRequest) Selector ¶
func (r *QuerySelectorAllRequest) Selector(v string) *QuerySelectorAllRequest
Selector string.
type QuerySelectorAllResult ¶
type QuerySelectorAllResult struct { // Query selector result. NodeIds []NodeId `json:"nodeIds"` }
type QuerySelectorRequest ¶
type QuerySelectorRequest struct {
// contains filtered or unexported fields
}
func (*QuerySelectorRequest) Do ¶
func (r *QuerySelectorRequest) Do() (*QuerySelectorResult, error)
func (*QuerySelectorRequest) NodeId ¶
func (r *QuerySelectorRequest) NodeId(v NodeId) *QuerySelectorRequest
Id of the node to query upon.
func (*QuerySelectorRequest) Selector ¶
func (r *QuerySelectorRequest) Selector(v string) *QuerySelectorRequest
Selector string.
type QuerySelectorResult ¶
type QuerySelectorResult struct { // Query selector result. NodeId NodeId `json:"nodeId"` }
type RGBA ¶
type RGBA struct { // The red component, in the [0-255] range. R int `json:"r"` // The green component, in the [0-255] range. G int `json:"g"` // The blue component, in the [0-255] range. B int `json:"b"` // The alpha component, in the [0-1] range (default: 1). (optional) A float64 `json:"a,omitempty"` }
type RedoRequest ¶
type RedoRequest struct {
// contains filtered or unexported fields
}
func (*RedoRequest) Do ¶
func (r *RedoRequest) Do() error
type RemoveAttributeRequest ¶
type RemoveAttributeRequest struct {
// contains filtered or unexported fields
}
func (*RemoveAttributeRequest) Do ¶
func (r *RemoveAttributeRequest) Do() error
func (*RemoveAttributeRequest) Name ¶
func (r *RemoveAttributeRequest) Name(v string) *RemoveAttributeRequest
Name of the attribute to remove.
func (*RemoveAttributeRequest) NodeId ¶
func (r *RemoveAttributeRequest) NodeId(v NodeId) *RemoveAttributeRequest
Id of the element to remove attribute from.
type RemoveNodeRequest ¶
type RemoveNodeRequest struct {
// contains filtered or unexported fields
}
func (*RemoveNodeRequest) Do ¶
func (r *RemoveNodeRequest) Do() error
func (*RemoveNodeRequest) NodeId ¶
func (r *RemoveNodeRequest) NodeId(v NodeId) *RemoveNodeRequest
Id of the node to remove.
type RequestChildNodesRequest ¶
type RequestChildNodesRequest struct {
// contains filtered or unexported fields
}
func (*RequestChildNodesRequest) Depth ¶
func (r *RequestChildNodesRequest) Depth(v int) *RequestChildNodesRequest
The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional, experimental)
func (*RequestChildNodesRequest) Do ¶
func (r *RequestChildNodesRequest) Do() error
func (*RequestChildNodesRequest) NodeId ¶
func (r *RequestChildNodesRequest) NodeId(v NodeId) *RequestChildNodesRequest
Id of the node to get children for.
func (*RequestChildNodesRequest) Pierce ¶
func (r *RequestChildNodesRequest) Pierce(v bool) *RequestChildNodesRequest
Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false). (optional, experimental)
type RequestNodeRequest ¶
type RequestNodeRequest struct {
// contains filtered or unexported fields
}
func (*RequestNodeRequest) Do ¶
func (r *RequestNodeRequest) Do() (*RequestNodeResult, error)
func (*RequestNodeRequest) ObjectId ¶
func (r *RequestNodeRequest) ObjectId(v runtime.RemoteObjectId) *RequestNodeRequest
JavaScript object id to convert into node.
type RequestNodeResult ¶
type RequestNodeResult struct { // Node id for given object. NodeId NodeId `json:"nodeId"` }
type ResolveNodeRequest ¶
type ResolveNodeRequest struct {
// contains filtered or unexported fields
}
func (*ResolveNodeRequest) Do ¶
func (r *ResolveNodeRequest) Do() (*ResolveNodeResult, error)
func (*ResolveNodeRequest) NodeId ¶
func (r *ResolveNodeRequest) NodeId(v NodeId) *ResolveNodeRequest
Id of the node to resolve.
func (*ResolveNodeRequest) ObjectGroup ¶
func (r *ResolveNodeRequest) ObjectGroup(v string) *ResolveNodeRequest
Symbolic group name that can be used to release multiple objects. (optional)
type ResolveNodeResult ¶
type ResolveNodeResult struct { // JavaScript object wrapper for given node. Object *runtime.RemoteObject `json:"object"` }
type SetAttributeValueRequest ¶
type SetAttributeValueRequest struct {
// contains filtered or unexported fields
}
func (*SetAttributeValueRequest) Do ¶
func (r *SetAttributeValueRequest) Do() error
func (*SetAttributeValueRequest) Name ¶
func (r *SetAttributeValueRequest) Name(v string) *SetAttributeValueRequest
Attribute name.
func (*SetAttributeValueRequest) NodeId ¶
func (r *SetAttributeValueRequest) NodeId(v NodeId) *SetAttributeValueRequest
Id of the element to set attribute for.
func (*SetAttributeValueRequest) Value ¶
func (r *SetAttributeValueRequest) Value(v string) *SetAttributeValueRequest
Attribute value.
type SetAttributesAsTextRequest ¶
type SetAttributesAsTextRequest struct {
// contains filtered or unexported fields
}
func (*SetAttributesAsTextRequest) Do ¶
func (r *SetAttributesAsTextRequest) Do() error
func (*SetAttributesAsTextRequest) Name ¶
func (r *SetAttributesAsTextRequest) Name(v string) *SetAttributesAsTextRequest
Attribute name to replace with new attributes derived from text in case text parsed successfully. (optional)
func (*SetAttributesAsTextRequest) NodeId ¶
func (r *SetAttributesAsTextRequest) NodeId(v NodeId) *SetAttributesAsTextRequest
Id of the element to set attributes for.
func (*SetAttributesAsTextRequest) Text ¶
func (r *SetAttributesAsTextRequest) Text(v string) *SetAttributesAsTextRequest
Text with a number of attributes. Will parse this text using HTML parser.
type SetChildNodesEvent ¶
type SetChildNodesEvent struct { // Parent node id to populate with children. ParentId NodeId `json:"parentId"` // Child nodes array. Nodes []*Node `json:"nodes"` }
Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
type SetFileInputFilesRequest ¶
type SetFileInputFilesRequest struct {
// contains filtered or unexported fields
}
func (*SetFileInputFilesRequest) Do ¶
func (r *SetFileInputFilesRequest) Do() error
func (*SetFileInputFilesRequest) Files ¶
func (r *SetFileInputFilesRequest) Files(v []string) *SetFileInputFilesRequest
Array of file paths to set.
func (*SetFileInputFilesRequest) NodeId ¶
func (r *SetFileInputFilesRequest) NodeId(v NodeId) *SetFileInputFilesRequest
Id of the file input node to set files for.
type SetInspectedNodeRequest ¶
type SetInspectedNodeRequest struct {
// contains filtered or unexported fields
}
func (*SetInspectedNodeRequest) Do ¶
func (r *SetInspectedNodeRequest) Do() error
func (*SetInspectedNodeRequest) NodeId ¶
func (r *SetInspectedNodeRequest) NodeId(v NodeId) *SetInspectedNodeRequest
DOM node id to be accessible by means of $x command line API.
type SetNodeNameRequest ¶
type SetNodeNameRequest struct {
// contains filtered or unexported fields
}
func (*SetNodeNameRequest) Do ¶
func (r *SetNodeNameRequest) Do() (*SetNodeNameResult, error)
func (*SetNodeNameRequest) Name ¶
func (r *SetNodeNameRequest) Name(v string) *SetNodeNameRequest
New node's name.
func (*SetNodeNameRequest) NodeId ¶
func (r *SetNodeNameRequest) NodeId(v NodeId) *SetNodeNameRequest
Id of the node to set name for.
type SetNodeNameResult ¶
type SetNodeNameResult struct { // New node's id. NodeId NodeId `json:"nodeId"` }
type SetNodeValueRequest ¶
type SetNodeValueRequest struct {
// contains filtered or unexported fields
}
func (*SetNodeValueRequest) Do ¶
func (r *SetNodeValueRequest) Do() error
func (*SetNodeValueRequest) NodeId ¶
func (r *SetNodeValueRequest) NodeId(v NodeId) *SetNodeValueRequest
Id of the node to set value for.
func (*SetNodeValueRequest) Value ¶
func (r *SetNodeValueRequest) Value(v string) *SetNodeValueRequest
New node's value.
type SetOuterHTMLRequest ¶
type SetOuterHTMLRequest struct {
// contains filtered or unexported fields
}
func (*SetOuterHTMLRequest) Do ¶
func (r *SetOuterHTMLRequest) Do() error
func (*SetOuterHTMLRequest) NodeId ¶
func (r *SetOuterHTMLRequest) NodeId(v NodeId) *SetOuterHTMLRequest
Id of the node to set markup for.
func (*SetOuterHTMLRequest) OuterHTML ¶
func (r *SetOuterHTMLRequest) OuterHTML(v string) *SetOuterHTMLRequest
Outer HTML markup to set.
type ShadowRootPoppedEvent ¶
type ShadowRootPoppedEvent struct { // Host element id. HostId NodeId `json:"hostId"` // Shadow root id. RootId NodeId `json:"rootId"` }
Called when shadow root is popped from the element. (experimental)
type ShadowRootPushedEvent ¶
type ShadowRootPushedEvent struct { // Host element id. HostId NodeId `json:"hostId"` // Shadow root. Root *Node `json:"root"` }
Called when shadow root is pushed into the element. (experimental)
type ShadowRootType ¶
type ShadowRootType string
type ShapeOutsideInfo ¶
type ShapeOutsideInfo struct { // Shape bounds Bounds Quad `json:"bounds"` // Shape coordinate details Shape []interface{} `json:"shape"` // Margin shape bounds MarginShape []interface{} `json:"marginShape"` }
type UndoRequest ¶
type UndoRequest struct {
// contains filtered or unexported fields
}
func (*UndoRequest) Do ¶
func (r *UndoRequest) Do() error