Documentation ¶
Overview ¶
Package dom implements 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.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AttributeModifiedClient
- type AttributeModifiedReply
- type AttributeRemovedClient
- type AttributeRemovedReply
- type BackendNode
- type BackendNodeID
- type BoxModel
- type CharacterDataModifiedClient
- type CharacterDataModifiedReply
- type ChildNodeCountUpdatedClient
- type ChildNodeCountUpdatedReply
- type ChildNodeInsertedClient
- type ChildNodeInsertedReply
- type ChildNodeRemovedClient
- type ChildNodeRemovedReply
- type CollectClassNamesFromSubtreeArgs
- type CollectClassNamesFromSubtreeReply
- type CopyToArgs
- type CopyToReply
- type DescribeNodeArgs
- func (a *DescribeNodeArgs) SetBackendNodeID(backendNodeID BackendNodeID) *DescribeNodeArgs
- func (a *DescribeNodeArgs) SetDepth(depth int) *DescribeNodeArgs
- func (a *DescribeNodeArgs) SetNodeID(nodeID NodeID) *DescribeNodeArgs
- func (a *DescribeNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *DescribeNodeArgs
- func (a *DescribeNodeArgs) SetPierce(pierce bool) *DescribeNodeArgs
- type DescribeNodeReply
- type DiscardSearchResultsArgs
- type DistributedNodesUpdatedClient
- type DistributedNodesUpdatedReply
- type DocumentUpdatedClient
- type DocumentUpdatedReply
- type FocusArgs
- type GetAttributesArgs
- type GetAttributesReply
- type GetBoxModelArgs
- type GetBoxModelReply
- type GetContentQuadsArgs
- type GetContentQuadsReply
- type GetDocumentArgs
- type GetDocumentReply
- type GetFileInfoArgs
- type GetFileInfoReply
- type GetFlattenedDocumentArgs
- type GetFlattenedDocumentReply
- type GetFrameOwnerArgs
- type GetFrameOwnerReply
- type GetNodeForLocationArgs
- type GetNodeForLocationReply
- type GetOuterHTMLArgs
- type GetOuterHTMLReply
- type GetRelayoutBoundaryArgs
- type GetRelayoutBoundaryReply
- type GetSearchResultsArgs
- type GetSearchResultsReply
- type InlineStyleInvalidatedClient
- type InlineStyleInvalidatedReply
- type MoveToArgs
- type MoveToReply
- type Node
- type NodeID
- type PerformSearchArgs
- type PerformSearchReply
- type PseudoElementAddedClient
- type PseudoElementAddedReply
- type PseudoElementRemovedClient
- type PseudoElementRemovedReply
- type PseudoType
- type PushNodeByPathToFrontendArgs
- type PushNodeByPathToFrontendReply
- type PushNodesByBackendIDsToFrontendArgs
- type PushNodesByBackendIDsToFrontendReply
- type Quad
- type QuerySelectorAllArgs
- type QuerySelectorAllReply
- type QuerySelectorArgs
- type QuerySelectorReply
- type RGBA
- type Rect
- type RemoveAttributeArgs
- type RemoveNodeArgs
- type RequestChildNodesArgs
- type RequestNodeArgs
- type RequestNodeReply
- type ResolveNodeArgs
- type ResolveNodeReply
- type SetAttributeValueArgs
- type SetAttributesAsTextArgs
- type SetChildNodesClient
- type SetChildNodesReply
- type SetFileInputFilesArgs
- type SetInspectedNodeArgs
- type SetNodeNameArgs
- type SetNodeNameReply
- type SetNodeValueArgs
- type SetOuterHTMLArgs
- type ShadowRootPoppedClient
- type ShadowRootPoppedReply
- type ShadowRootPushedClient
- type ShadowRootPushedReply
- type ShadowRootType
- type ShapeOutsideInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttributeModifiedClient ¶
type AttributeModifiedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*AttributeModifiedReply, error) rpcc.Stream }
AttributeModifiedClient is a client for AttributeModified events. Fired when `Element`'s attribute is modified.
type AttributeModifiedReply ¶
type AttributeModifiedReply struct { NodeID NodeID `json:"nodeId"` // Id of the node that has changed. Name string `json:"name"` // Attribute name. Value string `json:"value"` // Attribute value. }
AttributeModifiedReply is the reply for AttributeModified events.
type AttributeRemovedClient ¶
type AttributeRemovedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*AttributeRemovedReply, error) rpcc.Stream }
AttributeRemovedClient is a client for AttributeRemoved events. Fired when `Element`'s attribute is removed.
type AttributeRemovedReply ¶
type AttributeRemovedReply struct { NodeID NodeID `json:"nodeId"` // Id of the node that has changed. Name string `json:"name"` // A ttribute name. }
AttributeRemovedReply is the reply for AttributeRemoved events.
type BackendNode ¶
type BackendNode struct { NodeType int `json:"nodeType"` // `Node`'s nodeType. NodeName string `json:"nodeName"` // `Node`'s nodeName. BackendNodeID BackendNodeID `json:"backendNodeId"` // No description. }
BackendNode Backend node with a friendly name.
type BackendNodeID ¶
type BackendNodeID int
BackendNodeID Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.
type BoxModel ¶
type BoxModel struct { Content Quad `json:"content"` // Content box Padding Quad `json:"padding"` // Padding box Border Quad `json:"border"` // Border box Margin Quad `json:"margin"` // Margin box Width int `json:"width"` // Node width Height int `json:"height"` // Node height ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates }
BoxModel Box model.
type CharacterDataModifiedClient ¶
type CharacterDataModifiedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*CharacterDataModifiedReply, error) rpcc.Stream }
CharacterDataModifiedClient is a client for CharacterDataModified events. Mirrors `DOMCharacterDataModified` event.
type CharacterDataModifiedReply ¶
type CharacterDataModifiedReply struct { NodeID NodeID `json:"nodeId"` // Id of the node that has changed. CharacterData string `json:"characterData"` // New text value. }
CharacterDataModifiedReply is the reply for CharacterDataModified events.
type ChildNodeCountUpdatedClient ¶
type ChildNodeCountUpdatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ChildNodeCountUpdatedReply, error) rpcc.Stream }
ChildNodeCountUpdatedClient is a client for ChildNodeCountUpdated events. Fired when `Container`'s child node count has changed.
type ChildNodeCountUpdatedReply ¶
type ChildNodeCountUpdatedReply struct { NodeID NodeID `json:"nodeId"` // Id of the node that has changed. ChildNodeCount int `json:"childNodeCount"` // New node count. }
ChildNodeCountUpdatedReply is the reply for ChildNodeCountUpdated events.
type ChildNodeInsertedClient ¶
type ChildNodeInsertedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ChildNodeInsertedReply, error) rpcc.Stream }
ChildNodeInsertedClient is a client for ChildNodeInserted events. Mirrors `DOMNodeInserted` event.
type ChildNodeInsertedReply ¶
type ChildNodeInsertedReply struct { ParentNodeID NodeID `json:"parentNodeId"` // Id of the node that has changed. PreviousNodeID NodeID `json:"previousNodeId"` // If of the previous siblint. Node Node `json:"node"` // Inserted node data. }
ChildNodeInsertedReply is the reply for ChildNodeInserted events.
type ChildNodeRemovedClient ¶
type ChildNodeRemovedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ChildNodeRemovedReply, error) rpcc.Stream }
ChildNodeRemovedClient is a client for ChildNodeRemoved events. Mirrors `DOMNodeRemoved` event.
type ChildNodeRemovedReply ¶
type ChildNodeRemovedReply struct { ParentNodeID NodeID `json:"parentNodeId"` // Parent id. NodeID NodeID `json:"nodeId"` // Id of the node that has been removed. }
ChildNodeRemovedReply is the reply for ChildNodeRemoved events.
type CollectClassNamesFromSubtreeArgs ¶
type CollectClassNamesFromSubtreeArgs struct {
NodeID NodeID `json:"nodeId"` // Id of the node to collect class names.
}
CollectClassNamesFromSubtreeArgs represents the arguments for CollectClassNamesFromSubtree in the DOM domain.
func NewCollectClassNamesFromSubtreeArgs ¶
func NewCollectClassNamesFromSubtreeArgs(nodeID NodeID) *CollectClassNamesFromSubtreeArgs
NewCollectClassNamesFromSubtreeArgs initializes CollectClassNamesFromSubtreeArgs with the required arguments.
type CollectClassNamesFromSubtreeReply ¶
type CollectClassNamesFromSubtreeReply struct {
ClassNames []string `json:"classNames"` // Class name list.
}
CollectClassNamesFromSubtreeReply represents the return values for CollectClassNamesFromSubtree in the DOM domain.
type CopyToArgs ¶
type CopyToArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to copy. TargetNodeID NodeID `json:"targetNodeId"` // Id of the element to drop the copy into. InsertBeforeNodeID *NodeID `json:"insertBeforeNodeId,omitempty"` // Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`). }
CopyToArgs represents the arguments for CopyTo in the DOM domain.
func NewCopyToArgs ¶
func NewCopyToArgs(nodeID NodeID, targetNodeID NodeID) *CopyToArgs
NewCopyToArgs initializes CopyToArgs with the required arguments.
func (*CopyToArgs) SetInsertBeforeNodeID ¶
func (a *CopyToArgs) SetInsertBeforeNodeID(insertBeforeNodeID NodeID) *CopyToArgs
SetInsertBeforeNodeID sets the InsertBeforeNodeID optional argument. Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`).
type CopyToReply ¶
type CopyToReply struct {
NodeID NodeID `json:"nodeId"` // Id of the node clone.
}
CopyToReply represents the return values for CopyTo in the DOM domain.
type DescribeNodeArgs ¶ added in v0.11.4
type DescribeNodeArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. Depth *int `json:"depth,omitempty"` // 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. Pierce *bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). }
DescribeNodeArgs represents the arguments for DescribeNode in the DOM domain.
func NewDescribeNodeArgs ¶ added in v0.11.4
func NewDescribeNodeArgs() *DescribeNodeArgs
NewDescribeNodeArgs initializes DescribeNodeArgs with the required arguments.
func (*DescribeNodeArgs) SetBackendNodeID ¶ added in v0.11.4
func (a *DescribeNodeArgs) SetBackendNodeID(backendNodeID BackendNodeID) *DescribeNodeArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*DescribeNodeArgs) SetDepth ¶ added in v0.11.4
func (a *DescribeNodeArgs) SetDepth(depth int) *DescribeNodeArgs
SetDepth sets the Depth optional argument. 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.
func (*DescribeNodeArgs) SetNodeID ¶ added in v0.11.4
func (a *DescribeNodeArgs) SetNodeID(nodeID NodeID) *DescribeNodeArgs
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*DescribeNodeArgs) SetObjectID ¶ added in v0.11.4
func (a *DescribeNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *DescribeNodeArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
func (*DescribeNodeArgs) SetPierce ¶ added in v0.11.4
func (a *DescribeNodeArgs) SetPierce(pierce bool) *DescribeNodeArgs
SetPierce sets the Pierce optional argument. Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
type DescribeNodeReply ¶ added in v0.11.4
type DescribeNodeReply struct {
Node Node `json:"node"` // Node description.
}
DescribeNodeReply represents the return values for DescribeNode in the DOM domain.
type DiscardSearchResultsArgs ¶
type DiscardSearchResultsArgs struct {
SearchID string `json:"searchId"` // Unique search session identifier.
}
DiscardSearchResultsArgs represents the arguments for DiscardSearchResults in the DOM domain.
func NewDiscardSearchResultsArgs ¶
func NewDiscardSearchResultsArgs(searchID string) *DiscardSearchResultsArgs
NewDiscardSearchResultsArgs initializes DiscardSearchResultsArgs with the required arguments.
type DistributedNodesUpdatedClient ¶
type DistributedNodesUpdatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*DistributedNodesUpdatedReply, error) rpcc.Stream }
DistributedNodesUpdatedClient is a client for DistributedNodesUpdated events. Called when distribution is changed.
type DistributedNodesUpdatedReply ¶
type DistributedNodesUpdatedReply struct { InsertionPointID NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated. DistributedNodes []BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point. }
DistributedNodesUpdatedReply is the reply for DistributedNodesUpdated events.
type DocumentUpdatedClient ¶
type DocumentUpdatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*DocumentUpdatedReply, error) rpcc.Stream }
DocumentUpdatedClient is a client for DocumentUpdated events. Fired when `Document` has been totally updated. Node ids are no longer valid.
type DocumentUpdatedReply ¶
type DocumentUpdatedReply struct { }
DocumentUpdatedReply is the reply for DocumentUpdated events.
type FocusArgs ¶
type FocusArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. }
FocusArgs represents the arguments for Focus in the DOM domain.
func NewFocusArgs ¶
func NewFocusArgs() *FocusArgs
NewFocusArgs initializes FocusArgs with the required arguments.
func (*FocusArgs) SetBackendNodeID ¶ added in v0.9.1
func (a *FocusArgs) SetBackendNodeID(backendNodeID BackendNodeID) *FocusArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*FocusArgs) SetNodeID ¶ added in v0.9.1
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*FocusArgs) SetObjectID ¶ added in v0.9.1
func (a *FocusArgs) SetObjectID(objectID runtime.RemoteObjectID) *FocusArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
type GetAttributesArgs ¶
type GetAttributesArgs struct {
NodeID NodeID `json:"nodeId"` // Id of the node to retrieve attibutes for.
}
GetAttributesArgs represents the arguments for GetAttributes in the DOM domain.
func NewGetAttributesArgs ¶
func NewGetAttributesArgs(nodeID NodeID) *GetAttributesArgs
NewGetAttributesArgs initializes GetAttributesArgs with the required arguments.
type GetAttributesReply ¶
type GetAttributesReply struct {
Attributes []string `json:"attributes"` // An interleaved array of node attribute names and values.
}
GetAttributesReply represents the return values for GetAttributes in the DOM domain.
type GetBoxModelArgs ¶
type GetBoxModelArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. }
GetBoxModelArgs represents the arguments for GetBoxModel in the DOM domain.
func NewGetBoxModelArgs ¶
func NewGetBoxModelArgs() *GetBoxModelArgs
NewGetBoxModelArgs initializes GetBoxModelArgs with the required arguments.
func (*GetBoxModelArgs) SetBackendNodeID ¶ added in v0.9.1
func (a *GetBoxModelArgs) SetBackendNodeID(backendNodeID BackendNodeID) *GetBoxModelArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*GetBoxModelArgs) SetNodeID ¶ added in v0.9.1
func (a *GetBoxModelArgs) SetNodeID(nodeID NodeID) *GetBoxModelArgs
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*GetBoxModelArgs) SetObjectID ¶ added in v0.9.1
func (a *GetBoxModelArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetBoxModelArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
type GetBoxModelReply ¶
type GetBoxModelReply struct {
Model BoxModel `json:"model"` // Box model for the node.
}
GetBoxModelReply represents the return values for GetBoxModel in the DOM domain.
type GetContentQuadsArgs ¶ added in v0.18.5
type GetContentQuadsArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. }
GetContentQuadsArgs represents the arguments for GetContentQuads in the DOM domain.
func NewGetContentQuadsArgs ¶ added in v0.18.5
func NewGetContentQuadsArgs() *GetContentQuadsArgs
NewGetContentQuadsArgs initializes GetContentQuadsArgs with the required arguments.
func (*GetContentQuadsArgs) SetBackendNodeID ¶ added in v0.18.5
func (a *GetContentQuadsArgs) SetBackendNodeID(backendNodeID BackendNodeID) *GetContentQuadsArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*GetContentQuadsArgs) SetNodeID ¶ added in v0.18.5
func (a *GetContentQuadsArgs) SetNodeID(nodeID NodeID) *GetContentQuadsArgs
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*GetContentQuadsArgs) SetObjectID ¶ added in v0.18.5
func (a *GetContentQuadsArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetContentQuadsArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
type GetContentQuadsReply ¶ added in v0.18.5
type GetContentQuadsReply struct {
Quads []Quad `json:"quads"` // Quads that describe node layout relative to viewport.
}
GetContentQuadsReply represents the return values for GetContentQuads in the DOM domain.
type GetDocumentArgs ¶
type GetDocumentArgs struct { Depth *int `json:"depth,omitempty"` // 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. Pierce *bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). }
GetDocumentArgs represents the arguments for GetDocument in the DOM domain.
func NewGetDocumentArgs ¶
func NewGetDocumentArgs() *GetDocumentArgs
NewGetDocumentArgs initializes GetDocumentArgs with the required arguments.
func (*GetDocumentArgs) SetDepth ¶
func (a *GetDocumentArgs) SetDepth(depth int) *GetDocumentArgs
SetDepth sets the Depth optional argument. 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.
func (*GetDocumentArgs) SetPierce ¶
func (a *GetDocumentArgs) SetPierce(pierce bool) *GetDocumentArgs
SetPierce sets the Pierce optional argument. Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
type GetDocumentReply ¶
type GetDocumentReply struct {
Root Node `json:"root"` // Resulting node.
}
GetDocumentReply represents the return values for GetDocument in the DOM domain.
type GetFileInfoArgs ¶ added in v0.21.0
type GetFileInfoArgs struct {
ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id of the node wrapper.
}
GetFileInfoArgs represents the arguments for GetFileInfo in the DOM domain.
func NewGetFileInfoArgs ¶ added in v0.21.0
func NewGetFileInfoArgs(objectID runtime.RemoteObjectID) *GetFileInfoArgs
NewGetFileInfoArgs initializes GetFileInfoArgs with the required arguments.
type GetFileInfoReply ¶ added in v0.21.0
type GetFileInfoReply struct {
Path string `json:"path"` // No description.
}
GetFileInfoReply represents the return values for GetFileInfo in the DOM domain.
type GetFlattenedDocumentArgs ¶
type GetFlattenedDocumentArgs struct { Depth *int `json:"depth,omitempty"` // 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. Pierce *bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). }
GetFlattenedDocumentArgs represents the arguments for GetFlattenedDocument in the DOM domain.
func NewGetFlattenedDocumentArgs ¶
func NewGetFlattenedDocumentArgs() *GetFlattenedDocumentArgs
NewGetFlattenedDocumentArgs initializes GetFlattenedDocumentArgs with the required arguments.
func (*GetFlattenedDocumentArgs) SetDepth ¶
func (a *GetFlattenedDocumentArgs) SetDepth(depth int) *GetFlattenedDocumentArgs
SetDepth sets the Depth optional argument. 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.
func (*GetFlattenedDocumentArgs) SetPierce ¶
func (a *GetFlattenedDocumentArgs) SetPierce(pierce bool) *GetFlattenedDocumentArgs
SetPierce sets the Pierce optional argument. Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
type GetFlattenedDocumentReply ¶
type GetFlattenedDocumentReply struct {
Nodes []Node `json:"nodes"` // Resulting node.
}
GetFlattenedDocumentReply represents the return values for GetFlattenedDocument in the DOM domain.
type GetFrameOwnerArgs ¶ added in v0.16.1
type GetFrameOwnerArgs struct {
FrameID internal.PageFrameID `json:"frameId"` // No description.
}
GetFrameOwnerArgs represents the arguments for GetFrameOwner in the DOM domain.
func NewGetFrameOwnerArgs ¶ added in v0.16.1
func NewGetFrameOwnerArgs(frameID internal.PageFrameID) *GetFrameOwnerArgs
NewGetFrameOwnerArgs initializes GetFrameOwnerArgs with the required arguments.
type GetFrameOwnerReply ¶ added in v0.16.1
type GetFrameOwnerReply struct { BackendNodeID BackendNodeID `json:"backendNodeId"` // Resulting node. NodeID *NodeID `json:"nodeId,omitempty"` // Id of the node at given coordinates, only when enabled. }
GetFrameOwnerReply represents the return values for GetFrameOwner in the DOM domain.
type GetNodeForLocationArgs ¶
type GetNodeForLocationArgs struct { X int `json:"x"` // X coordinate. Y int `json:"y"` // Y coordinate. IncludeUserAgentShadowDOM *bool `json:"includeUserAgentShadowDOM,omitempty"` // False to skip to the nearest non-UA shadow root ancestor (default: false). }
GetNodeForLocationArgs represents the arguments for GetNodeForLocation in the DOM domain.
func NewGetNodeForLocationArgs ¶
func NewGetNodeForLocationArgs(x int, y int) *GetNodeForLocationArgs
NewGetNodeForLocationArgs initializes GetNodeForLocationArgs with the required arguments.
func (*GetNodeForLocationArgs) SetIncludeUserAgentShadowDOM ¶
func (a *GetNodeForLocationArgs) SetIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *GetNodeForLocationArgs
SetIncludeUserAgentShadowDOM sets the IncludeUserAgentShadowDOM optional argument. False to skip to the nearest non-UA shadow root ancestor (default: false).
type GetNodeForLocationReply ¶
type GetNodeForLocationReply struct { BackendNodeID BackendNodeID `json:"backendNodeId"` // Resulting node. NodeID *NodeID `json:"nodeId,omitempty"` // Id of the node at given coordinates, only when enabled. }
GetNodeForLocationReply represents the return values for GetNodeForLocation in the DOM domain.
type GetOuterHTMLArgs ¶
type GetOuterHTMLArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. }
GetOuterHTMLArgs represents the arguments for GetOuterHTML in the DOM domain.
func NewGetOuterHTMLArgs ¶
func NewGetOuterHTMLArgs() *GetOuterHTMLArgs
NewGetOuterHTMLArgs initializes GetOuterHTMLArgs with the required arguments.
func (*GetOuterHTMLArgs) SetBackendNodeID ¶ added in v0.11.4
func (a *GetOuterHTMLArgs) SetBackendNodeID(backendNodeID BackendNodeID) *GetOuterHTMLArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*GetOuterHTMLArgs) SetNodeID ¶ added in v0.11.4
func (a *GetOuterHTMLArgs) SetNodeID(nodeID NodeID) *GetOuterHTMLArgs
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*GetOuterHTMLArgs) SetObjectID ¶ added in v0.11.4
func (a *GetOuterHTMLArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetOuterHTMLArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
type GetOuterHTMLReply ¶
type GetOuterHTMLReply struct {
OuterHTML string `json:"outerHTML"` // Outer HTML markup.
}
GetOuterHTMLReply represents the return values for GetOuterHTML in the DOM domain.
type GetRelayoutBoundaryArgs ¶
type GetRelayoutBoundaryArgs struct {
NodeID NodeID `json:"nodeId"` // Id of the node.
}
GetRelayoutBoundaryArgs represents the arguments for GetRelayoutBoundary in the DOM domain.
func NewGetRelayoutBoundaryArgs ¶
func NewGetRelayoutBoundaryArgs(nodeID NodeID) *GetRelayoutBoundaryArgs
NewGetRelayoutBoundaryArgs initializes GetRelayoutBoundaryArgs with the required arguments.
type GetRelayoutBoundaryReply ¶
type GetRelayoutBoundaryReply struct {
NodeID NodeID `json:"nodeId"` // Relayout boundary node id for the given node.
}
GetRelayoutBoundaryReply represents the return values for GetRelayoutBoundary in the DOM domain.
type GetSearchResultsArgs ¶
type GetSearchResultsArgs struct { SearchID string `json:"searchId"` // Unique search session identifier. FromIndex int `json:"fromIndex"` // Start index of the search result to be returned. ToIndex int `json:"toIndex"` // End index of the search result to be returned. }
GetSearchResultsArgs represents the arguments for GetSearchResults in the DOM domain.
func NewGetSearchResultsArgs ¶
func NewGetSearchResultsArgs(searchID string, fromIndex int, toIndex int) *GetSearchResultsArgs
NewGetSearchResultsArgs initializes GetSearchResultsArgs with the required arguments.
type GetSearchResultsReply ¶
type GetSearchResultsReply struct {
NodeIDs []NodeID `json:"nodeIds"` // Ids of the search result nodes.
}
GetSearchResultsReply represents the return values for GetSearchResults in the DOM domain.
type InlineStyleInvalidatedClient ¶
type InlineStyleInvalidatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*InlineStyleInvalidatedReply, error) rpcc.Stream }
InlineStyleInvalidatedClient is a client for InlineStyleInvalidated events. Fired when `Element`'s inline style is modified via a CSS property modification.
type InlineStyleInvalidatedReply ¶
type InlineStyleInvalidatedReply struct {
NodeIDs []NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
}
InlineStyleInvalidatedReply is the reply for InlineStyleInvalidated events.
type MoveToArgs ¶
type MoveToArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to move. TargetNodeID NodeID `json:"targetNodeId"` // Id of the element to drop the moved node into. InsertBeforeNodeID *NodeID `json:"insertBeforeNodeId,omitempty"` // Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`). }
MoveToArgs represents the arguments for MoveTo in the DOM domain.
func NewMoveToArgs ¶
func NewMoveToArgs(nodeID NodeID, targetNodeID NodeID) *MoveToArgs
NewMoveToArgs initializes MoveToArgs with the required arguments.
func (*MoveToArgs) SetInsertBeforeNodeID ¶
func (a *MoveToArgs) SetInsertBeforeNodeID(insertBeforeNodeID NodeID) *MoveToArgs
SetInsertBeforeNodeID sets the InsertBeforeNodeID optional argument. Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`).
type MoveToReply ¶
type MoveToReply struct {
NodeID NodeID `json:"nodeId"` // New id of the moved node.
}
MoveToReply represents the return values for MoveTo in the DOM domain.
type Node ¶
type Node struct { NodeID NodeID `json:"nodeId"` // Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client. ParentID *NodeID `json:"parentId,omitempty"` // The id of the parent node if any. BackendNodeID BackendNodeID `json:"backendNodeId"` // The BackendNodeId for this node. NodeType int `json:"nodeType"` // `Node`'s nodeType. NodeName string `json:"nodeName"` // `Node`'s nodeName. LocalName string `json:"localName"` // `Node`'s localName. NodeValue string `json:"nodeValue"` // `Node`'s nodeValue. ChildNodeCount *int `json:"childNodeCount,omitempty"` // Child count for `Container` nodes. Children []Node `json:"children,omitempty"` // Child nodes of this node when requested with children. Attributes []string `json:"attributes,omitempty"` // Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. DocumentURL *string `json:"documentURL,omitempty"` // Document URL that `Document` or `FrameOwner` node points to. BaseURL *string `json:"baseURL,omitempty"` // Base URL that `Document` or `FrameOwner` node uses for URL completion. PublicID *string `json:"publicId,omitempty"` // `DocumentType`'s publicId. SystemID *string `json:"systemId,omitempty"` // `DocumentType`'s systemId. InternalSubset *string `json:"internalSubset,omitempty"` // `DocumentType`'s internalSubset. XMLVersion *string `json:"xmlVersion,omitempty"` // `Document`'s XML version in case of XML documents. Name *string `json:"name,omitempty"` // `Attr`'s name. Value *string `json:"value,omitempty"` // `Attr`'s value. PseudoType PseudoType `json:"pseudoType,omitempty"` // Pseudo element type for this node. ShadowRootType ShadowRootType `json:"shadowRootType,omitempty"` // Shadow root type. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements. ContentDocument *Node `json:"contentDocument,omitempty"` // Content document for frame owner elements. ShadowRoots []Node `json:"shadowRoots,omitempty"` // Shadow root list for given element host. TemplateContent *Node `json:"templateContent,omitempty"` // Content document fragment for template elements. PseudoElements []Node `json:"pseudoElements,omitempty"` // Pseudo elements associated with this node. ImportedDocument *Node `json:"importedDocument,omitempty"` // Import document for the HTMLImport links. DistributedNodes []BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point. IsSVG *bool `json:"isSVG,omitempty"` // Whether the node is SVG. }
Node DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
type PerformSearchArgs ¶
type PerformSearchArgs struct { Query string `json:"query"` // Plain text or query selector or XPath search query. IncludeUserAgentShadowDOM *bool `json:"includeUserAgentShadowDOM,omitempty"` // True to search in user agent shadow DOM. }
PerformSearchArgs represents the arguments for PerformSearch in the DOM domain.
func NewPerformSearchArgs ¶
func NewPerformSearchArgs(query string) *PerformSearchArgs
NewPerformSearchArgs initializes PerformSearchArgs with the required arguments.
func (*PerformSearchArgs) SetIncludeUserAgentShadowDOM ¶
func (a *PerformSearchArgs) SetIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *PerformSearchArgs
SetIncludeUserAgentShadowDOM sets the IncludeUserAgentShadowDOM optional argument. True to search in user agent shadow DOM.
type PerformSearchReply ¶
type PerformSearchReply struct { SearchID string `json:"searchId"` // Unique search session identifier. ResultCount int `json:"resultCount"` // Number of search results. }
PerformSearchReply represents the return values for PerformSearch in the DOM domain.
type PseudoElementAddedClient ¶
type PseudoElementAddedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*PseudoElementAddedReply, error) rpcc.Stream }
PseudoElementAddedClient is a client for PseudoElementAdded events. Called when a pseudo element is added to an element.
type PseudoElementAddedReply ¶
type PseudoElementAddedReply struct { ParentID NodeID `json:"parentId"` // Pseudo element's parent element id. PseudoElement Node `json:"pseudoElement"` // The added pseudo element. }
PseudoElementAddedReply is the reply for PseudoElementAdded events.
type PseudoElementRemovedClient ¶
type PseudoElementRemovedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*PseudoElementRemovedReply, error) rpcc.Stream }
PseudoElementRemovedClient is a client for PseudoElementRemoved events. Called when a pseudo element is removed from an element.
type PseudoElementRemovedReply ¶
type PseudoElementRemovedReply struct { ParentID NodeID `json:"parentId"` // Pseudo element's parent element id. PseudoElementID NodeID `json:"pseudoElementId"` // The removed pseudo element id. }
PseudoElementRemovedReply is the reply for PseudoElementRemoved events.
type PseudoType ¶
type PseudoType string
PseudoType Pseudo element type.
const ( PseudoTypeNotSet PseudoType = "" PseudoTypeFirstLine PseudoType = "first-line" PseudoTypeFirstLetter PseudoType = "first-letter" PseudoTypeBefore PseudoType = "before" PseudoTypeAfter PseudoType = "after" PseudoTypeBackdrop PseudoType = "backdrop" PseudoTypeSelection PseudoType = "selection" PseudoTypeFirstLineInherited PseudoType = "first-line-inherited" PseudoTypeScrollbar PseudoType = "scrollbar" PseudoTypeScrollbarThumb PseudoType = "scrollbar-thumb" PseudoTypeScrollbarButton PseudoType = "scrollbar-button" PseudoTypeScrollbarTrack PseudoType = "scrollbar-track" PseudoTypeScrollbarTrackPiece PseudoType = "scrollbar-track-piece" PseudoTypeScrollbarCorner PseudoType = "scrollbar-corner" PseudoTypeResizer PseudoType = "resizer" PseudoTypeInputListButton PseudoType = "input-list-button" )
PseudoType as enums.
func (PseudoType) String ¶
func (e PseudoType) String() string
func (PseudoType) Valid ¶
func (e PseudoType) Valid() bool
type PushNodeByPathToFrontendArgs ¶
type PushNodeByPathToFrontendArgs struct {
Path string `json:"path"` // Path to node in the proprietary format.
}
PushNodeByPathToFrontendArgs represents the arguments for PushNodeByPathToFrontend in the DOM domain.
func NewPushNodeByPathToFrontendArgs ¶
func NewPushNodeByPathToFrontendArgs(path string) *PushNodeByPathToFrontendArgs
NewPushNodeByPathToFrontendArgs initializes PushNodeByPathToFrontendArgs with the required arguments.
type PushNodeByPathToFrontendReply ¶
type PushNodeByPathToFrontendReply struct {
NodeID NodeID `json:"nodeId"` // Id of the node for given path.
}
PushNodeByPathToFrontendReply represents the return values for PushNodeByPathToFrontend in the DOM domain.
type PushNodesByBackendIDsToFrontendArgs ¶ added in v0.19.1
type PushNodesByBackendIDsToFrontendArgs struct {
BackendNodeIDs []BackendNodeID `json:"backendNodeIds"` // The array of backend node ids.
}
PushNodesByBackendIDsToFrontendArgs represents the arguments for PushNodesByBackendIDsToFrontend in the DOM domain.
func NewPushNodesByBackendIDsToFrontendArgs ¶ added in v0.19.1
func NewPushNodesByBackendIDsToFrontendArgs(backendNodeIDs []BackendNodeID) *PushNodesByBackendIDsToFrontendArgs
NewPushNodesByBackendIDsToFrontendArgs initializes PushNodesByBackendIDsToFrontendArgs with the required arguments.
type PushNodesByBackendIDsToFrontendReply ¶ added in v0.19.1
type PushNodesByBackendIDsToFrontendReply struct {
NodeIDs []NodeID `json:"nodeIds"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
}
PushNodesByBackendIDsToFrontendReply represents the return values for PushNodesByBackendIDsToFrontend in the DOM domain.
type Quad ¶
type Quad []float64
Quad An array of quad vertices, x immediately followed by y for each point, points clock-wise.
type QuerySelectorAllArgs ¶
type QuerySelectorAllArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to query upon. Selector string `json:"selector"` // Selector string. }
QuerySelectorAllArgs represents the arguments for QuerySelectorAll in the DOM domain.
func NewQuerySelectorAllArgs ¶
func NewQuerySelectorAllArgs(nodeID NodeID, selector string) *QuerySelectorAllArgs
NewQuerySelectorAllArgs initializes QuerySelectorAllArgs with the required arguments.
type QuerySelectorAllReply ¶
type QuerySelectorAllReply struct {
NodeIDs []NodeID `json:"nodeIds"` // Query selector result.
}
QuerySelectorAllReply represents the return values for QuerySelectorAll in the DOM domain.
type QuerySelectorArgs ¶
type QuerySelectorArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to query upon. Selector string `json:"selector"` // Selector string. }
QuerySelectorArgs represents the arguments for QuerySelector in the DOM domain.
func NewQuerySelectorArgs ¶
func NewQuerySelectorArgs(nodeID NodeID, selector string) *QuerySelectorArgs
NewQuerySelectorArgs initializes QuerySelectorArgs with the required arguments.
type QuerySelectorReply ¶
type QuerySelectorReply struct {
NodeID NodeID `json:"nodeId"` // Query selector result.
}
QuerySelectorReply represents the return values for QuerySelector in the DOM domain.
type RGBA ¶
type RGBA struct { R int `json:"r"` // The red component, in the [0-255] range. G int `json:"g"` // The green component, in the [0-255] range. B int `json:"b"` // The blue component, in the [0-255] range. A *float64 `json:"a,omitempty"` // The alpha component, in the [0-1] range (default: 1). }
RGBA A structure holding an RGBA color.
type Rect ¶
type Rect struct { X float64 `json:"x"` // X coordinate Y float64 `json:"y"` // Y coordinate Width float64 `json:"width"` // Rectangle width Height float64 `json:"height"` // Rectangle height }
Rect Rectangle.
type RemoveAttributeArgs ¶
type RemoveAttributeArgs struct { NodeID NodeID `json:"nodeId"` // Id of the element to remove attribute from. Name string `json:"name"` // Name of the attribute to remove. }
RemoveAttributeArgs represents the arguments for RemoveAttribute in the DOM domain.
func NewRemoveAttributeArgs ¶
func NewRemoveAttributeArgs(nodeID NodeID, name string) *RemoveAttributeArgs
NewRemoveAttributeArgs initializes RemoveAttributeArgs with the required arguments.
type RemoveNodeArgs ¶
type RemoveNodeArgs struct {
NodeID NodeID `json:"nodeId"` // Id of the node to remove.
}
RemoveNodeArgs represents the arguments for RemoveNode in the DOM domain.
func NewRemoveNodeArgs ¶
func NewRemoveNodeArgs(nodeID NodeID) *RemoveNodeArgs
NewRemoveNodeArgs initializes RemoveNodeArgs with the required arguments.
type RequestChildNodesArgs ¶
type RequestChildNodesArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to get children for. Depth *int `json:"depth,omitempty"` // 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. Pierce *bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false). }
RequestChildNodesArgs represents the arguments for RequestChildNodes in the DOM domain.
func NewRequestChildNodesArgs ¶
func NewRequestChildNodesArgs(nodeID NodeID) *RequestChildNodesArgs
NewRequestChildNodesArgs initializes RequestChildNodesArgs with the required arguments.
func (*RequestChildNodesArgs) SetDepth ¶
func (a *RequestChildNodesArgs) SetDepth(depth int) *RequestChildNodesArgs
SetDepth sets the Depth optional argument. 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.
func (*RequestChildNodesArgs) SetPierce ¶
func (a *RequestChildNodesArgs) SetPierce(pierce bool) *RequestChildNodesArgs
SetPierce sets the Pierce optional argument. Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
type RequestNodeArgs ¶
type RequestNodeArgs struct {
ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id to convert into node.
}
RequestNodeArgs represents the arguments for RequestNode in the DOM domain.
func NewRequestNodeArgs ¶
func NewRequestNodeArgs(objectID runtime.RemoteObjectID) *RequestNodeArgs
NewRequestNodeArgs initializes RequestNodeArgs with the required arguments.
type RequestNodeReply ¶
type RequestNodeReply struct {
NodeID NodeID `json:"nodeId"` // Node id for given object.
}
RequestNodeReply represents the return values for RequestNode in the DOM domain.
type ResolveNodeArgs ¶
type ResolveNodeArgs struct { NodeID *NodeID `json:"nodeId,omitempty"` // Id of the node to resolve. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Backend identifier of the node to resolve. ObjectGroup *string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. }
ResolveNodeArgs represents the arguments for ResolveNode in the DOM domain.
func NewResolveNodeArgs ¶
func NewResolveNodeArgs() *ResolveNodeArgs
NewResolveNodeArgs initializes ResolveNodeArgs with the required arguments.
func (*ResolveNodeArgs) SetBackendNodeID ¶ added in v0.9.1
func (a *ResolveNodeArgs) SetBackendNodeID(backendNodeID BackendNodeID) *ResolveNodeArgs
SetBackendNodeID sets the BackendNodeID optional argument. Backend identifier of the node to resolve.
func (*ResolveNodeArgs) SetNodeID ¶ added in v0.9.1
func (a *ResolveNodeArgs) SetNodeID(nodeID NodeID) *ResolveNodeArgs
SetNodeID sets the NodeID optional argument. Id of the node to resolve.
func (*ResolveNodeArgs) SetObjectGroup ¶
func (a *ResolveNodeArgs) SetObjectGroup(objectGroup string) *ResolveNodeArgs
SetObjectGroup sets the ObjectGroup optional argument. Symbolic group name that can be used to release multiple objects.
type ResolveNodeReply ¶
type ResolveNodeReply struct {
Object runtime.RemoteObject `json:"object"` // JavaScript object wrapper for given node.
}
ResolveNodeReply represents the return values for ResolveNode in the DOM domain.
type SetAttributeValueArgs ¶
type SetAttributeValueArgs struct { NodeID NodeID `json:"nodeId"` // Id of the element to set attribute for. Name string `json:"name"` // Attribute name. Value string `json:"value"` // Attribute value. }
SetAttributeValueArgs represents the arguments for SetAttributeValue in the DOM domain.
func NewSetAttributeValueArgs ¶
func NewSetAttributeValueArgs(nodeID NodeID, name string, value string) *SetAttributeValueArgs
NewSetAttributeValueArgs initializes SetAttributeValueArgs with the required arguments.
type SetAttributesAsTextArgs ¶
type SetAttributesAsTextArgs struct { NodeID NodeID `json:"nodeId"` // Id of the element to set attributes for. Text string `json:"text"` // Text with a number of attributes. Will parse this text using HTML parser. Name *string `json:"name,omitempty"` // Attribute name to replace with new attributes derived from text in case text parsed successfully. }
SetAttributesAsTextArgs represents the arguments for SetAttributesAsText in the DOM domain.
func NewSetAttributesAsTextArgs ¶
func NewSetAttributesAsTextArgs(nodeID NodeID, text string) *SetAttributesAsTextArgs
NewSetAttributesAsTextArgs initializes SetAttributesAsTextArgs with the required arguments.
func (*SetAttributesAsTextArgs) SetName ¶
func (a *SetAttributesAsTextArgs) SetName(name string) *SetAttributesAsTextArgs
SetName sets the Name optional argument. Attribute name to replace with new attributes derived from text in case text parsed successfully.
type SetChildNodesClient ¶
type SetChildNodesClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*SetChildNodesReply, error) rpcc.Stream }
SetChildNodesClient is a client for SetChildNodes events. Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
type SetChildNodesReply ¶
type SetChildNodesReply struct { ParentID NodeID `json:"parentId"` // Parent node id to populate with children. Nodes []Node `json:"nodes"` // Child nodes array. }
SetChildNodesReply is the reply for SetChildNodes events.
type SetFileInputFilesArgs ¶
type SetFileInputFilesArgs struct { Files []string `json:"files"` // Array of file paths to set. NodeID *NodeID `json:"nodeId,omitempty"` // Identifier of the node. BackendNodeID *BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper. }
SetFileInputFilesArgs represents the arguments for SetFileInputFiles in the DOM domain.
func NewSetFileInputFilesArgs ¶
func NewSetFileInputFilesArgs(files []string) *SetFileInputFilesArgs
NewSetFileInputFilesArgs initializes SetFileInputFilesArgs with the required arguments.
func (*SetFileInputFilesArgs) SetBackendNodeID ¶ added in v0.9.1
func (a *SetFileInputFilesArgs) SetBackendNodeID(backendNodeID BackendNodeID) *SetFileInputFilesArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node.
func (*SetFileInputFilesArgs) SetNodeID ¶ added in v0.9.1
func (a *SetFileInputFilesArgs) SetNodeID(nodeID NodeID) *SetFileInputFilesArgs
SetNodeID sets the NodeID optional argument. Identifier of the node.
func (*SetFileInputFilesArgs) SetObjectID ¶ added in v0.9.1
func (a *SetFileInputFilesArgs) SetObjectID(objectID runtime.RemoteObjectID) *SetFileInputFilesArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper.
type SetInspectedNodeArgs ¶
type SetInspectedNodeArgs struct {
NodeID NodeID `json:"nodeId"` // DOM node id to be accessible by means of $x command line API.
}
SetInspectedNodeArgs represents the arguments for SetInspectedNode in the DOM domain.
func NewSetInspectedNodeArgs ¶
func NewSetInspectedNodeArgs(nodeID NodeID) *SetInspectedNodeArgs
NewSetInspectedNodeArgs initializes SetInspectedNodeArgs with the required arguments.
type SetNodeNameArgs ¶
type SetNodeNameArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to set name for. Name string `json:"name"` // New node's name. }
SetNodeNameArgs represents the arguments for SetNodeName in the DOM domain.
func NewSetNodeNameArgs ¶
func NewSetNodeNameArgs(nodeID NodeID, name string) *SetNodeNameArgs
NewSetNodeNameArgs initializes SetNodeNameArgs with the required arguments.
type SetNodeNameReply ¶
type SetNodeNameReply struct {
NodeID NodeID `json:"nodeId"` // New node's id.
}
SetNodeNameReply represents the return values for SetNodeName in the DOM domain.
type SetNodeValueArgs ¶
type SetNodeValueArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to set value for. Value string `json:"value"` // New node's value. }
SetNodeValueArgs represents the arguments for SetNodeValue in the DOM domain.
func NewSetNodeValueArgs ¶
func NewSetNodeValueArgs(nodeID NodeID, value string) *SetNodeValueArgs
NewSetNodeValueArgs initializes SetNodeValueArgs with the required arguments.
type SetOuterHTMLArgs ¶
type SetOuterHTMLArgs struct { NodeID NodeID `json:"nodeId"` // Id of the node to set markup for. OuterHTML string `json:"outerHTML"` // Outer HTML markup to set. }
SetOuterHTMLArgs represents the arguments for SetOuterHTML in the DOM domain.
func NewSetOuterHTMLArgs ¶
func NewSetOuterHTMLArgs(nodeID NodeID, outerHTML string) *SetOuterHTMLArgs
NewSetOuterHTMLArgs initializes SetOuterHTMLArgs with the required arguments.
type ShadowRootPoppedClient ¶
type ShadowRootPoppedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ShadowRootPoppedReply, error) rpcc.Stream }
ShadowRootPoppedClient is a client for ShadowRootPopped events. Called when shadow root is popped from the element.
type ShadowRootPoppedReply ¶
type ShadowRootPoppedReply struct { HostID NodeID `json:"hostId"` // Host element id. RootID NodeID `json:"rootId"` // Shadow root id. }
ShadowRootPoppedReply is the reply for ShadowRootPopped events.
type ShadowRootPushedClient ¶
type ShadowRootPushedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ShadowRootPushedReply, error) rpcc.Stream }
ShadowRootPushedClient is a client for ShadowRootPushed events. Called when shadow root is pushed into the element.
type ShadowRootPushedReply ¶
type ShadowRootPushedReply struct { HostID NodeID `json:"hostId"` // Host element id. Root Node `json:"root"` // Shadow root. }
ShadowRootPushedReply is the reply for ShadowRootPushed events.
type ShadowRootType ¶
type ShadowRootType string
ShadowRootType Shadow root type.
const ( ShadowRootTypeNotSet ShadowRootType = "" ShadowRootTypeUserAgent ShadowRootType = "user-agent" ShadowRootTypeOpen ShadowRootType = "open" ShadowRootTypeClosed ShadowRootType = "closed" )
ShadowRootType as enums.
func (ShadowRootType) String ¶
func (e ShadowRootType) String() string
func (ShadowRootType) Valid ¶
func (e ShadowRootType) Valid() bool
type ShapeOutsideInfo ¶
type ShapeOutsideInfo struct { Bounds Quad `json:"bounds"` // Shape bounds Shape []json.RawMessage `json:"shape"` // Shape coordinate details MarginShape []json.RawMessage `json:"marginShape"` // Margin shape bounds }
ShapeOutsideInfo CSS Shape Outside details.