class DOMOperations
(source)
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.
Link
Protocol DOM domain documentation.
fun attributeModified(): Flowable<AttributeModifiedEvent>
Fired when |
|
fun attributeModifiedTimed(): Flowable<Timed<AttributeModifiedEvent>>
Fired when |
|
fun attributeRemoved(): Flowable<AttributeRemovedEvent>
Fired when |
|
fun attributeRemovedTimed(): Flowable<Timed<AttributeRemovedEvent>>
Fired when |
|
fun characterDataModified(): Flowable<CharacterDataModifiedEvent>
Mirrors |
|
fun characterDataModifiedTimed(): Flowable<Timed<CharacterDataModifiedEvent>>
Mirrors |
|
fun childNodeCountUpdated(): Flowable<ChildNodeCountUpdatedEvent>
Fired when |
|
fun childNodeCountUpdatedTimed(): Flowable<Timed<ChildNodeCountUpdatedEvent>>
Fired when |
|
fun childNodeInserted(): Flowable<ChildNodeInsertedEvent>
Mirrors |
|
fun childNodeInsertedTimed(): Flowable<Timed<ChildNodeInsertedEvent>>
Mirrors |
|
fun childNodeRemoved(): Flowable<ChildNodeRemovedEvent>
Mirrors |
|
fun childNodeRemovedTimed(): Flowable<Timed<ChildNodeRemovedEvent>>
Mirrors |
|
fun collectClassNamesFromSubtree(input: CollectClassNamesFromSubtreeRequest): Single<CollectClassNamesFromSubtreeResponse>
Collects class names for the node with given id and all of it's child nodes. |
|
fun copyTo(input: CopyToRequest): Single<CopyToResponse>
Creates a deep copy of the specified node and places it into the target container before the given anchor. |
|
fun describeNode(input: DescribeNodeRequest): Single<DescribeNodeResponse>
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. |
|
fun disable(): Single<ResponseFrame>
Disables DOM agent for the given page. |
|
fun discardSearchResults(input: DiscardSearchResultsRequest): Single<ResponseFrame>
Discards search results from the session with the given id. |
|
fun distributedNodesUpdated(): Flowable<DistributedNodesUpdatedEvent>
Called when distrubution is changed. |
|
fun distributedNodesUpdatedTimed(): Flowable<Timed<DistributedNodesUpdatedEvent>>
Called when distrubution is changed. |
|
fun documentUpdated(): Flowable<Event>
Fired when |
|
fun documentUpdatedTimed(): Flowable<Timed<Event>>
Fired when |
|
fun enable(): Single<ResponseFrame>
Enables DOM agent for the given page. |
|
fun events(): Flowable<Event>
Returns flowable capturing all DOM domains events. |
|
fun focus(input: FocusRequest): Single<ResponseFrame>
Focuses the given element. |
|
fun getAttributes(input: GetAttributesRequest): Single<GetAttributesResponse>
Returns attributes for the specified node. |
|
fun getBoxModel(input: GetBoxModelRequest): Single<GetBoxModelResponse>
Returns boxes for the given node. |
|
fun getContentQuads(input: GetContentQuadsRequest): Single<GetContentQuadsResponse>
Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. |
|
fun getDocument(input: GetDocumentRequest): Single<GetDocumentResponse>
Returns the root DOM node (and optionally the subtree) to the caller. |
|
fun getFileInfo(input: GetFileInfoRequest): Single<GetFileInfoResponse>
Returns file information for the given File wrapper. |
|
fun getFlattenedDocument(input: GetFlattenedDocumentRequest): Single<GetFlattenedDocumentResponse>
Returns the root DOM node (and optionally the subtree) to the caller. |
|
fun getFrameOwner(input: GetFrameOwnerRequest): Single<GetFrameOwnerResponse>
Returns iframe node that owns iframe with the given domain. |
|
fun getNodeForLocation(input: GetNodeForLocationRequest): Single<GetNodeForLocationResponse>
Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. |
|
fun getNodeStackTraces(input: GetNodeStackTracesRequest): Single<GetNodeStackTracesResponse>
Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. |
|
fun getOuterHTML(input: GetOuterHTMLRequest): Single<GetOuterHTMLResponse>
Returns node's HTML markup. |
|
fun getRelayoutBoundary(input: GetRelayoutBoundaryRequest): Single<GetRelayoutBoundaryResponse>
Returns the id of the nearest ancestor that is a relayout boundary. |
|
fun getSearchResults(input: GetSearchResultsRequest): Single<GetSearchResultsResponse>
Returns search results from given |
|
fun hideHighlight(): Single<ResponseFrame>
Hides any highlight. |
|
fun highlightNode(): Single<ResponseFrame>
Highlights DOM node. |
|
fun highlightRect(): Single<ResponseFrame>
Highlights given rectangle. |
|
fun inlineStyleInvalidated(): Flowable<InlineStyleInvalidatedEvent>
Fired when |
|
fun inlineStyleInvalidatedTimed(): Flowable<Timed<InlineStyleInvalidatedEvent>>
Fired when |
|
fun markUndoableState(): Single<ResponseFrame>
Marks last undoable state. |
|
fun moveTo(input: MoveToRequest): Single<MoveToResponse>
Moves node into the new container, places it before the given anchor. |
|
fun performSearch(input: PerformSearchRequest): Single<PerformSearchResponse>
Searches for a given string in the DOM tree. Use |
|
fun pseudoElementAdded(): Flowable<PseudoElementAddedEvent>
Called when a pseudo element is added to an element. |
|
fun pseudoElementAddedTimed(): Flowable<Timed<PseudoElementAddedEvent>>
Called when a pseudo element is added to an element. |
|
fun pseudoElementRemoved(): Flowable<PseudoElementRemovedEvent>
Called when a pseudo element is removed from an element. |
|
fun pseudoElementRemovedTimed(): Flowable<Timed<PseudoElementRemovedEvent>>
Called when a pseudo element is removed from an element. |
|
fun pushNodeByPathToFrontend(input: PushNodeByPathToFrontendRequest): Single<PushNodeByPathToFrontendResponse>
Requests that the node is sent to the caller given its path. // FIXME, use XPath |
|
fun pushNodesByBackendIdsToFrontend(input: PushNodesByBackendIdsToFrontendRequest): Single<PushNodesByBackendIdsToFrontendResponse>
Requests that a batch of nodes is sent to the caller given their backend node ids. |
|
fun querySelector(input: QuerySelectorRequest): Single<QuerySelectorResponse>
Executes |
|
fun querySelectorAll(input: QuerySelectorAllRequest): Single<QuerySelectorAllResponse>
Executes |
|
fun redo(): Single<ResponseFrame>
Re-does the last undone action. |
|
fun removeAttribute(input: RemoveAttributeRequest): Single<ResponseFrame>
Removes attribute with given name from an element with given id. |
|
fun removeNode(input: RemoveNodeRequest): Single<ResponseFrame>
Removes node with given id. |
|
fun requestChildNodes(input: RequestChildNodesRequest): Single<ResponseFrame>
Requests that children of the node with given id are returned to the caller in form of
|
|
fun requestNode(input: RequestNodeRequest): Single<RequestNodeResponse>
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
|
|
fun resolveNode(input: ResolveNodeRequest): Single<ResolveNodeResponse>
Resolves the JavaScript node object for a given NodeId or BackendNodeId. |
|
fun setAttributesAsText(input: SetAttributesAsTextRequest): Single<ResponseFrame>
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. |
|
fun setAttributeValue(input: SetAttributeValueRequest): Single<ResponseFrame>
Sets attribute for an element with given id. |
|
fun setChildNodes(): Flowable<SetChildNodesEvent>
Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids. |
|
fun setChildNodesTimed(): Flowable<Timed<SetChildNodesEvent>>
Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids. |
|
fun setFileInputFiles(input: SetFileInputFilesRequest): Single<ResponseFrame>
Sets files for the given file input element. |
|
fun setInspectedNode(input: SetInspectedNodeRequest): Single<ResponseFrame>
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). |
|
fun setNodeName(input: SetNodeNameRequest): Single<SetNodeNameResponse>
Sets node name for a node with given id. |
|
fun setNodeStackTracesEnabled(input: SetNodeStackTracesEnabledRequest): Single<ResponseFrame>
Sets if stack traces should be captured for Nodes. See |
|
fun setNodeValue(input: SetNodeValueRequest): Single<ResponseFrame>
Sets node value for a node with given id. |
|
fun setOuterHTML(input: SetOuterHTMLRequest): Single<ResponseFrame>
Sets node HTML markup, returns new node id. |
|
fun shadowRootPopped(): Flowable<ShadowRootPoppedEvent>
Called when shadow root is popped from the element. |
|
fun shadowRootPoppedTimed(): Flowable<Timed<ShadowRootPoppedEvent>>
Called when shadow root is popped from the element. |
|
fun shadowRootPushed(): Flowable<ShadowRootPushedEvent>
Called when shadow root is pushed into the element. |
|
fun shadowRootPushedTimed(): Flowable<Timed<ShadowRootPushedEvent>>
Called when shadow root is pushed into the element. |
|
fun undo(): Single<ResponseFrame>
Undoes the last performed action. |