DOM 协议
Chrome DevTools 协议的 DOM 域命令、事件和类型。
方法
pydoll.protocol.dom.methods
CollectClassNamesFromSubtreeResponse
module-attribute
CollectClassNamesFromSubtreeResponse = Response[CollectClassNamesFromSubtreeResult]
GetFlattenedDocumentResponse
module-attribute
GetFlattenedDocumentResponse = Response[GetFlattenedDocumentResult]
GetNodesForSubtreeByStyleResponse
module-attribute
GetNodesForSubtreeByStyleResponse = Response[GetNodesForSubtreeByStyleResult]
GetNodeForLocationResponse
module-attribute
GetNodeForLocationResponse = Response[GetNodeForLocationResult]
GetRelayoutBoundaryResponse
module-attribute
GetRelayoutBoundaryResponse = Response[GetRelayoutBoundaryResult]
GetSearchResultsResponse
module-attribute
GetSearchResultsResponse = Response[GetSearchResultsResult]
GetTopLayerElementsResponse
module-attribute
GetTopLayerElementsResponse = Response[GetTopLayerElementsResult]
GetElementByRelationResponse
module-attribute
GetElementByRelationResponse = Response[GetElementByRelationResult]
PushNodeByPathToFrontendResponse
module-attribute
PushNodeByPathToFrontendResponse = Response[PushNodeByPathToFrontendResult]
PushNodesByBackendIdsToFrontendResponse
module-attribute
PushNodesByBackendIdsToFrontendResponse = Response[PushNodesByBackendIdsToFrontendResult]
QuerySelectorAllResponse
module-attribute
QuerySelectorAllResponse = Response[QuerySelectorAllResult]
GetNodeStackTracesResponse
module-attribute
GetNodeStackTracesResponse = Response[GetNodeStackTracesResult]
GetDetachedDomNodesResponse
module-attribute
GetDetachedDomNodesResponse = Response[GetDetachedDomNodesResult]
GetContainerForNodeResponse
module-attribute
GetContainerForNodeResponse = Response[GetContainerForNodeResult]
GetQueryingDescendantsForContainerResponse
module-attribute
GetQueryingDescendantsForContainerResponse = Response[GetQueryingDescendantsForContainerResult]
GetAnchorElementResponse
module-attribute
GetAnchorElementResponse = Response[GetAnchorElementResult]
ForceShowPopoverResponse
module-attribute
ForceShowPopoverResponse = Response[ForceShowPopoverResult]
CollectClassNamesFromSubtreeCommand
module-attribute
CollectClassNamesFromSubtreeCommand = Command[CollectClassNamesFromSubtreeParams, CollectClassNamesFromSubtreeResponse]
DescribeNodeCommand
module-attribute
DescribeNodeCommand = Command[DescribeNodeParams, DescribeNodeResponse]
DiscardSearchResultsCommand
module-attribute
DiscardSearchResultsCommand = Command[DiscardSearchResultsParams, EmptyResponse]
ForceShowPopoverCommand
module-attribute
ForceShowPopoverCommand = Command[ForceShowPopoverParams, ForceShowPopoverResponse]
GetAnchorElementCommand
module-attribute
GetAnchorElementCommand = Command[GetAnchorElementParams, GetAnchorElementResponse]
GetAttributesCommand
module-attribute
GetAttributesCommand = Command[GetAttributesParams, GetAttributesResponse]
GetBoxModelCommand
module-attribute
GetBoxModelCommand = Command[GetBoxModelParams, GetBoxModelResponse]
GetContainerForNodeCommand
module-attribute
GetContainerForNodeCommand = Command[GetContainerForNodeParams, GetContainerForNodeResponse]
GetContentQuadsCommand
module-attribute
GetContentQuadsCommand = Command[GetContentQuadsParams, GetContentQuadsResponse]
GetDetachedDomNodesCommand
module-attribute
GetDetachedDomNodesCommand = Command[EmptyParams, GetDetachedDomNodesResponse]
GetDocumentCommand
module-attribute
GetDocumentCommand = Command[GetDocumentParams, GetDocumentResponse]
GetElementByRelationCommand
module-attribute
GetElementByRelationCommand = Command[GetElementByRelationParams, GetElementByRelationResponse]
GetFileInfoCommand
module-attribute
GetFileInfoCommand = Command[GetFileInfoParams, GetFileInfoResponse]
GetFlattenedDocumentCommand
module-attribute
GetFlattenedDocumentCommand = Command[GetFlattenedDocumentParams, GetFlattenedDocumentResponse]
GetFrameOwnerCommand
module-attribute
GetFrameOwnerCommand = Command[GetFrameOwnerParams, GetFrameOwnerResponse]
GetNodeForLocationCommand
module-attribute
GetNodeForLocationCommand = Command[GetNodeForLocationParams, GetNodeForLocationResponse]
GetNodeStackTracesCommand
module-attribute
GetNodeStackTracesCommand = Command[GetNodeStackTracesParams, GetNodeStackTracesResponse]
GetNodesForSubtreeByStyleCommand
module-attribute
GetNodesForSubtreeByStyleCommand = Command[GetNodesForSubtreeByStyleParams, GetNodesForSubtreeByStyleResponse]
GetOuterHTMLCommand
module-attribute
GetOuterHTMLCommand = Command[GetOuterHTMLParams, GetOuterHTMLResponse]
GetQueryingDescendantsForContainerCommand
module-attribute
GetQueryingDescendantsForContainerCommand = Command[GetQueryingDescendantsForContainerParams, GetQueryingDescendantsForContainerResponse]
GetRelayoutBoundaryCommand
module-attribute
GetRelayoutBoundaryCommand = Command[GetRelayoutBoundaryParams, GetRelayoutBoundaryResponse]
GetSearchResultsCommand
module-attribute
GetSearchResultsCommand = Command[GetSearchResultsParams, GetSearchResultsResponse]
GetTopLayerElementsCommand
module-attribute
GetTopLayerElementsCommand = Command[EmptyParams, GetTopLayerElementsResponse]
MarkUndoableStateCommand
module-attribute
MarkUndoableStateCommand = Command[EmptyParams, EmptyResponse]
PerformSearchCommand
module-attribute
PerformSearchCommand = Command[PerformSearchParams, PerformSearchResponse]
PushNodeByPathToFrontendCommand
module-attribute
PushNodeByPathToFrontendCommand = Command[PushNodeByPathToFrontendParams, PushNodeByPathToFrontendResponse]
PushNodesByBackendIdsToFrontendCommand
module-attribute
PushNodesByBackendIdsToFrontendCommand = Command[PushNodesByBackendIdsToFrontendParams, PushNodesByBackendIdsToFrontendResponse]
QuerySelectorCommand
module-attribute
QuerySelectorCommand = Command[QuerySelectorParams, QuerySelectorResponse]
QuerySelectorAllCommand
module-attribute
QuerySelectorAllCommand = Command[QuerySelectorAllParams, QuerySelectorAllResponse]
RemoveAttributeCommand
module-attribute
RemoveAttributeCommand = Command[RemoveAttributeParams, EmptyResponse]
RequestChildNodesCommand
module-attribute
RequestChildNodesCommand = Command[RequestChildNodesParams, EmptyResponse]
RequestNodeCommand
module-attribute
RequestNodeCommand = Command[RequestNodeParams, RequestNodeResponse]
ResolveNodeCommand
module-attribute
ResolveNodeCommand = Command[ResolveNodeParams, ResolveNodeResponse]
ScrollIntoViewIfNeededCommand
module-attribute
ScrollIntoViewIfNeededCommand = Command[ScrollIntoViewIfNeededParams, EmptyResponse]
SetAttributeValueCommand
module-attribute
SetAttributeValueCommand = Command[SetAttributeValueParams, EmptyResponse]
SetAttributesAsTextCommand
module-attribute
SetAttributesAsTextCommand = Command[SetAttributesAsTextParams, EmptyResponse]
SetFileInputFilesCommand
module-attribute
SetFileInputFilesCommand = Command[SetFileInputFilesParams, EmptyResponse]
SetInspectedNodeCommand
module-attribute
SetInspectedNodeCommand = Command[SetInspectedNodeParams, EmptyResponse]
SetNodeNameCommand
module-attribute
SetNodeNameCommand = Command[SetNodeNameParams, SetNodeNameResponse]
SetNodeStackTracesEnabledCommand
module-attribute
SetNodeStackTracesEnabledCommand = Command[SetNodeStackTracesEnabledParams, EmptyResponse]
SetNodeValueCommand
module-attribute
SetNodeValueCommand = Command[SetNodeValueParams, EmptyResponse]
SetOuterHTMLCommand
module-attribute
SetOuterHTMLCommand = Command[SetOuterHTMLParams, EmptyResponse]
DomMethod
Bases: str
, Enum
DOM domain method names.
COLLECT_CLASS_NAMES_FROM_SUBTREE
class-attribute
instance-attribute
DISCARD_SEARCH_RESULTS
class-attribute
instance-attribute
GET_CONTAINER_FOR_NODE
class-attribute
instance-attribute
GET_DETACHED_DOM_NODES
class-attribute
instance-attribute
GET_ELEMENT_BY_RELATION
class-attribute
instance-attribute
GET_FLATTENED_DOCUMENT
class-attribute
instance-attribute
GET_NODE_FOR_LOCATION
class-attribute
instance-attribute
GET_NODE_STACK_TRACES
class-attribute
instance-attribute
GET_NODES_FOR_SUBTREE_BY_STYLE
class-attribute
instance-attribute
GET_QUERYING_DESCENDANTS_FOR_CONTAINER
class-attribute
instance-attribute
GET_RELAYOUT_BOUNDARY
class-attribute
instance-attribute
GET_TOP_LAYER_ELEMENTS
class-attribute
instance-attribute
MARK_UNDOABLE_STATE
class-attribute
instance-attribute
PUSH_NODE_BY_PATH_TO_FRONTEND
class-attribute
instance-attribute
PUSH_NODES_BY_BACKEND_IDS_TO_FRONTEND
class-attribute
instance-attribute
REQUEST_CHILD_NODES
class-attribute
instance-attribute
SCROLL_INTO_VIEW_IF_NEEDED
class-attribute
instance-attribute
SET_ATTRIBUTE_VALUE
class-attribute
instance-attribute
SET_ATTRIBUTES_AS_TEXT
class-attribute
instance-attribute
SET_FILE_INPUT_FILES
class-attribute
instance-attribute
SET_NODE_STACK_TRACES_ENABLED
class-attribute
instance-attribute
CollectClassNamesFromSubtreeParams
CopyToParams
DescribeNodeParams
ScrollIntoViewIfNeededParams
DiscardSearchResultsParams
EnableParams
FocusParams
GetAttributesParams
GetBoxModelParams
GetContentQuadsParams
GetDocumentParams
GetFlattenedDocumentParams
GetNodesForSubtreeByStyleParams
GetNodeForLocationParams
GetOuterHTMLParams
GetRelayoutBoundaryParams
GetSearchResultsParams
MoveToParams
PerformSearchParams
PushNodeByPathToFrontendParams
PushNodesByBackendIdsToFrontendParams
QuerySelectorParams
QuerySelectorAllParams
GetElementByRelationParams
RemoveAttributeParams
RequestChildNodesParams
RequestNodeParams
ResolveNodeParams
SetAttributeValueParams
SetAttributesAsTextParams
SetFileInputFilesParams
SetNodeStackTracesEnabledParams
GetNodeStackTracesParams
GetFileInfoParams
SetInspectedNodeParams
SetNodeNameParams
SetNodeValueParams
SetOuterHTMLParams
GetFrameOwnerParams
GetContainerForNodeParams
Bases: TypedDict
Parameters for getting container for node.
GetQueryingDescendantsForContainerParams
GetAnchorElementParams
ForceShowPopoverParams
CollectClassNamesFromSubtreeResult
GetAttributesResult
GetContentQuadsResult
GetFlattenedDocumentResult
GetNodesForSubtreeByStyleResult
GetNodeForLocationResult
GetOuterHTMLResult
GetRelayoutBoundaryResult
GetSearchResultsResult
GetTopLayerElementsResult
GetElementByRelationResult
PerformSearchResult
PushNodeByPathToFrontendResult
PushNodesByBackendIdsToFrontendResult
QuerySelectorResult
QuerySelectorAllResult
GetNodeStackTracesResult
GetDetachedDomNodesResult
GetFrameOwnerResult
GetContainerForNodeResult
GetQueryingDescendantsForContainerResult
GetAnchorElementResult
事件
pydoll.protocol.dom.events
AttributeModifiedEvent
module-attribute
AttributeModifiedEvent = CDPEvent[AttributeModifiedEventParams]
AttributeRemovedEvent
module-attribute
AttributeRemovedEvent = CDPEvent[AttributeRemovedEventParams]
CharacterDataModifiedEvent
module-attribute
CharacterDataModifiedEvent = CDPEvent[CharacterDataModifiedEventParams]
ChildNodeCountUpdatedEvent
module-attribute
ChildNodeCountUpdatedEvent = CDPEvent[ChildNodeCountUpdatedEventParams]
ChildNodeInsertedEvent
module-attribute
ChildNodeInsertedEvent = CDPEvent[ChildNodeInsertedEventParams]
ChildNodeRemovedEvent
module-attribute
ChildNodeRemovedEvent = CDPEvent[ChildNodeRemovedEventParams]
DistributedNodesUpdatedEvent
module-attribute
DistributedNodesUpdatedEvent = CDPEvent[DistributedNodesUpdatedEventParams]
InlineStyleInvalidatedEvent
module-attribute
InlineStyleInvalidatedEvent = CDPEvent[InlineStyleInvalidatedEventParams]
PseudoElementAddedEvent
module-attribute
PseudoElementAddedEvent = CDPEvent[PseudoElementAddedEventParams]
PseudoElementRemovedEvent
module-attribute
PseudoElementRemovedEvent = CDPEvent[PseudoElementRemovedEventParams]
ScrollableFlagUpdatedEvent
module-attribute
ScrollableFlagUpdatedEvent = CDPEvent[ScrollableFlagUpdatedEventParams]
ShadowRootPoppedEvent
module-attribute
ShadowRootPoppedEvent = CDPEvent[ShadowRootPoppedEventParams]
ShadowRootPushedEvent
module-attribute
ShadowRootPushedEvent = CDPEvent[ShadowRootPushedEventParams]
TopLayerElementsUpdatedEvent
module-attribute
TopLayerElementsUpdatedEvent = CDPEvent[TopLayerElementsUpdatedEventParams]
DomEvent
Bases: str
, Enum
Events from the DOM domain of the Chrome DevTools Protocol.
This enumeration contains the names of DOM-related events that can be received from the Chrome DevTools Protocol. These events provide information about changes to the DOM structure, attributes, and other DOM-related activities.
ATTRIBUTE_MODIFIED
class-attribute
instance-attribute
Fired when Element's attribute is modified.
PARAMETER | DESCRIPTION |
---|---|
nodeId
|
Id of the node that has changed.
TYPE:
|
name
|
Attribute name.
TYPE:
|
value
|
Attribute value.
TYPE:
|
ATTRIBUTE_REMOVED
class-attribute
instance-attribute
Fired when Element's attribute is removed.
PARAMETER | DESCRIPTION |
---|---|
nodeId
|
Id of the node that has changed.
TYPE:
|
name
|
Attribute name.
TYPE:
|
CHARACTER_DATA_MODIFIED
class-attribute
instance-attribute
Mirrors DOMCharacterDataModified event.
PARAMETER | DESCRIPTION |
---|---|
nodeId
|
Id of the node that has changed.
TYPE:
|
characterData
|
New text value.
TYPE:
|
CHILD_NODE_COUNT_UPDATED
class-attribute
instance-attribute
Fired when Container's child node count has changed.
PARAMETER | DESCRIPTION |
---|---|
nodeId
|
Id of the node that has changed.
TYPE:
|
childNodeCount
|
New node count.
TYPE:
|
CHILD_NODE_INSERTED
class-attribute
instance-attribute
CHILD_NODE_REMOVED
class-attribute
instance-attribute
DISTRIBUTED_NODES_UPDATED
class-attribute
instance-attribute
Called when distribution is changed.
PARAMETER | DESCRIPTION |
---|---|
insertionPointId
|
Insertion point where distributed nodes were updated.
TYPE:
|
distributedNodes
|
Distributed nodes for given insertion point.
TYPE:
|
DOCUMENT_UPDATED
class-attribute
instance-attribute
Fired when Document has been totally updated. Node ids are no longer valid.
INLINE_STYLE_INVALIDATED
class-attribute
instance-attribute
Fired when Element's inline style is modified via a CSS property modification.
PARAMETER | DESCRIPTION |
---|---|
nodeIds
|
Ids of the nodes for which the inline styles have been invalidated.
TYPE:
|
PSEUDO_ELEMENT_ADDED
class-attribute
instance-attribute
PSEUDO_ELEMENT_REMOVED
class-attribute
instance-attribute
SCROLLABLE_FLAG_UPDATED
class-attribute
instance-attribute
Fired when a node's scrollability state changes.
PARAMETER | DESCRIPTION |
---|---|
nodeId
|
The id of the node.
TYPE:
|
isScrollable
|
If the node is scrollable.
TYPE:
|
SHADOW_ROOT_POPPED
class-attribute
instance-attribute
SHADOW_ROOT_PUSHED
class-attribute
instance-attribute
SET_CHILD_NODES
class-attribute
instance-attribute
AttributeModifiedEventParams
AttributeRemovedEventParams
CharacterDataModifiedEventParams
ChildNodeCountUpdatedEventParams
ChildNodeInsertedEventParams
ChildNodeRemovedEventParams
DistributedNodesUpdatedEventParams
DocumentUpdatedEventParams
Bases: TypedDict
Parameters for documentUpdated event.
InlineStyleInvalidatedEventParams
PseudoElementAddedEventParams
PseudoElementRemovedEventParams
ScrollableFlagUpdatedEventParams
ShadowRootPoppedEventParams
ShadowRootPushedEventParams
SetChildNodesEventParams
TopLayerElementsUpdatedEventParams
Bases: TypedDict
Parameters for topLayerElementsUpdated event.
类型
pydoll.protocol.dom.types
PseudoType
Bases: str
, Enum
Pseudo element type.
FIRST_LINE_INHERITED
class-attribute
instance-attribute
SCROLLBAR_TRACK_PIECE
class-attribute
instance-attribute
VIEW_TRANSITION_GROUP
class-attribute
instance-attribute
VIEW_TRANSITION_IMAGE_PAIR
class-attribute
instance-attribute
VIEW_TRANSITION_GROUP_CHILDREN
class-attribute
instance-attribute
FILE_SELECTOR_BUTTON
class-attribute
instance-attribute
ShadowRootType
CompatibilityMode
PhysicalAxes
LogicalAxes
ScrollOrientation
IncludeWhitespace
RelationType
BackendNode
Node
Bases: TypedDict
DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.