chromedp/cdp/dom/events.go
2017-01-24 22:09:23 +07:00

147 lines
5.1 KiB
Go

package dom
// AUTOGENERATED. DO NOT EDIT.
import (
. "github.com/knq/chromedp/cdp"
)
var (
_ BackendNode
_ BackendNodeID
_ ComputedProperty
_ ErrorType
_ Frame
_ FrameID
_ LoaderID
_ Message
_ MessageError
_ MethodType
_ Node
_ NodeID
_ NodeType
_ PseudoType
_ RGBA
_ ShadowRootType
_ Timestamp
)
// EventDocumentUpdated fired when Document has been totally updated. Node
// ids are no longer valid.
type EventDocumentUpdated struct{}
// EventInspectNodeRequested fired when the node should be inspected. This
// happens after call to setInspectMode.
type EventInspectNodeRequested struct {
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"` // Id of the node to inspect.
}
// EventSetChildNodes fired when backend wants to provide client with the
// missing DOM structure. This happens upon most of the calls requesting node
// ids.
type EventSetChildNodes struct {
ParentID NodeID `json:"parentId,omitempty"` // Parent node id to populate with children.
Nodes []*Node `json:"nodes,omitempty"` // Child nodes array.
}
// EventAttributeModified fired when Element's attribute is modified.
type EventAttributeModified struct {
NodeID NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
Name string `json:"name,omitempty"` // Attribute name.
Value string `json:"value,omitempty"` // Attribute value.
}
// EventAttributeRemoved fired when Element's attribute is removed.
type EventAttributeRemoved struct {
NodeID NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
Name string `json:"name,omitempty"` // A ttribute name.
}
// EventInlineStyleInvalidated fired when Element's inline style is modified
// via a CSS property modification.
type EventInlineStyleInvalidated struct {
NodeIds []NodeID `json:"nodeIds,omitempty"` // Ids of the nodes for which the inline styles have been invalidated.
}
// EventCharacterDataModified mirrors DOMCharacterDataModified event.
type EventCharacterDataModified struct {
NodeID NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
CharacterData string `json:"characterData,omitempty"` // New text value.
}
// EventChildNodeCountUpdated fired when Container's child node count has
// changed.
type EventChildNodeCountUpdated struct {
NodeID NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // New node count.
}
// EventChildNodeInserted mirrors DOMNodeInserted event.
type EventChildNodeInserted struct {
ParentNodeID NodeID `json:"parentNodeId,omitempty"` // Id of the node that has changed.
PreviousNodeID NodeID `json:"previousNodeId,omitempty"` // If of the previous siblint.
Node *Node `json:"node,omitempty"` // Inserted node data.
}
// EventChildNodeRemoved mirrors DOMNodeRemoved event.
type EventChildNodeRemoved struct {
ParentNodeID NodeID `json:"parentNodeId,omitempty"` // Parent id.
NodeID NodeID `json:"nodeId,omitempty"` // Id of the node that has been removed.
}
// EventShadowRootPushed called when shadow root is pushed into the element.
type EventShadowRootPushed struct {
HostID NodeID `json:"hostId,omitempty"` // Host element id.
Root *Node `json:"root,omitempty"` // Shadow root.
}
// EventShadowRootPopped called when shadow root is popped from the element.
type EventShadowRootPopped struct {
HostID NodeID `json:"hostId,omitempty"` // Host element id.
RootID NodeID `json:"rootId,omitempty"` // Shadow root id.
}
// EventPseudoElementAdded called when a pseudo element is added to an
// element.
type EventPseudoElementAdded struct {
ParentID NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
PseudoElement *Node `json:"pseudoElement,omitempty"` // The added pseudo element.
}
// EventPseudoElementRemoved called when a pseudo element is removed from an
// element.
type EventPseudoElementRemoved struct {
ParentID NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
PseudoElementID NodeID `json:"pseudoElementId,omitempty"` // The removed pseudo element id.
}
// EventDistributedNodesUpdated called when distrubution is changed.
type EventDistributedNodesUpdated struct {
InsertionPointID NodeID `json:"insertionPointId,omitempty"` // Insertion point where distrubuted nodes were updated.
DistributedNodes []*BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
}
type EventNodeHighlightRequested struct {
NodeID NodeID `json:"nodeId,omitempty"`
}
// EventTypes is all event types in the domain.
var EventTypes = []MethodType{
EventDOMDocumentUpdated,
EventDOMInspectNodeRequested,
EventDOMSetChildNodes,
EventDOMAttributeModified,
EventDOMAttributeRemoved,
EventDOMInlineStyleInvalidated,
EventDOMCharacterDataModified,
EventDOMChildNodeCountUpdated,
EventDOMChildNodeInserted,
EventDOMChildNodeRemoved,
EventDOMShadowRootPushed,
EventDOMShadowRootPopped,
EventDOMPseudoElementAdded,
EventDOMPseudoElementRemoved,
EventDOMDistributedNodesUpdated,
EventDOMNodeHighlightRequested,
}