dom

package
v0.0.0-...-4fec7a0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: BSD-2-Clause Imports: 2 Imported by: 1

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

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

type Client struct {
	*rpc.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 (*CollectClassNamesFromSubtreeRequest) NodeId

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 (*DiscardSearchResultsRequest) SearchId

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 (*GetAttributesRequest) NodeId

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 (*GetBoxModelRequest) NodeId

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

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 (*GetDocumentRequest) Pierce

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

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 (*GetFlattenedDocumentRequest) Pierce

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 (*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

X coordinate.

func (*GetNodeForLocationRequest) Y

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 (*GetOuterHTMLRequest) NodeId

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 (*GetRelayoutBoundaryRequest) NodeId

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 (*GetSearchResultsRequest) FromIndex

Start index of the search result to be returned.

func (*GetSearchResultsRequest) SearchId

Unique search session identifier.

func (*GetSearchResultsRequest) ToIndex

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

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 NodeId

type NodeId int

type PerformSearchRequest

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

func (*PerformSearchRequest) Do

func (*PerformSearchRequest) IncludeUserAgentShadowDOM

func (r *PerformSearchRequest) IncludeUserAgentShadowDOM(v bool) *PerformSearchRequest

True to search in user agent shadow DOM. (optional, experimental)

func (*PerformSearchRequest) Query

Plain text or query selector or XPath search query.

type PerformSearchResult

type PerformSearchResult struct {
	// Unique search session identifier.
	SearchId string `json:"searchId"`

	// Number of search results.
	ResultCount int `json:"resultCount"`
}

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 (*PushNodeByPathToFrontendRequest) Path

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

The array of backend node ids.

func (*PushNodesByBackendIdsToFrontendRequest) Do

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 Quad

type Quad []float64

type QuerySelectorAllRequest

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

func (*QuerySelectorAllRequest) Do

func (*QuerySelectorAllRequest) NodeId

Id of the node to query upon.

func (*QuerySelectorAllRequest) Selector

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 (*QuerySelectorRequest) NodeId

Id of the node to query upon.

func (*QuerySelectorRequest) Selector

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 Rect

type Rect struct {
	// X coordinate
	X float64 `json:"x"`

	// Y coordinate
	Y float64 `json:"y"`

	// Rectangle width
	Width float64 `json:"width"`

	// Rectangle height
	Height float64 `json:"height"`
}

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

Name of the attribute to remove.

func (*RemoveAttributeRequest) NodeId

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

Id of the node to remove.

type RequestChildNodesRequest

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

func (*RequestChildNodesRequest) Depth

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 (*RequestChildNodesRequest) NodeId

Id of the node to get children for.

func (*RequestChildNodesRequest) Pierce

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 (*RequestNodeRequest) ObjectId

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 (*ResolveNodeRequest) NodeId

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 (*SetAttributeValueRequest) Name

Attribute name.

func (*SetAttributeValueRequest) NodeId

Id of the element to set attribute for.

func (*SetAttributeValueRequest) Value

Attribute value.

type SetAttributesAsTextRequest

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

func (*SetAttributesAsTextRequest) Do

func (*SetAttributesAsTextRequest) Name

Attribute name to replace with new attributes derived from text in case text parsed successfully. (optional)

func (*SetAttributesAsTextRequest) NodeId

Id of the element to set attributes for.

func (*SetAttributesAsTextRequest) Text

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 (*SetFileInputFilesRequest) Files

Array of file paths to set.

func (*SetFileInputFilesRequest) NodeId

Id of the file input node to set files for.

type SetInspectedNodeRequest

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

func (*SetInspectedNodeRequest) Do

func (*SetInspectedNodeRequest) NodeId

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 (*SetNodeNameRequest) Name

New node's name.

func (*SetNodeNameRequest) NodeId

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

Id of the node to set value for.

func (*SetNodeValueRequest) Value

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

Id of the node to set markup for.

func (*SetOuterHTMLRequest) OuterHTML

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL