2017-01-24 15:09:23 +00:00
|
|
|
package dom
|
|
|
|
|
2017-07-09 02:05:19 +00:00
|
|
|
// Code generated by chromedp-gen. DO NOT EDIT.
|
2017-01-24 15:09:23 +00:00
|
|
|
|
|
|
|
import (
|
2017-01-26 07:28:34 +00:00
|
|
|
cdp "github.com/knq/chromedp/cdp"
|
2017-01-24 15:09:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// EventDocumentUpdated fired when Document has been totally updated. Node
|
|
|
|
// ids are no longer valid.
|
|
|
|
type EventDocumentUpdated struct{}
|
|
|
|
|
|
|
|
// 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 {
|
2017-07-02 11:44:34 +00:00
|
|
|
ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
|
|
|
|
Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventAttributeModified fired when Element's attribute is modified.
|
|
|
|
type EventAttributeModified struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
|
|
|
Name string `json:"name"` // Attribute name.
|
|
|
|
Value string `json:"value"` // Attribute value.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventAttributeRemoved fired when Element's attribute is removed.
|
|
|
|
type EventAttributeRemoved struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
|
|
|
Name string `json:"name"` // A ttribute name.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventInlineStyleInvalidated fired when Element's inline style is modified
|
|
|
|
// via a CSS property modification.
|
|
|
|
type EventInlineStyleInvalidated struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventCharacterDataModified mirrors DOMCharacterDataModified event.
|
|
|
|
type EventCharacterDataModified struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
|
|
|
CharacterData string `json:"characterData"` // New text value.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventChildNodeCountUpdated fired when Container's child node count has
|
|
|
|
// changed.
|
|
|
|
type EventChildNodeCountUpdated struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
|
|
|
ChildNodeCount int64 `json:"childNodeCount"` // New node count.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventChildNodeInserted mirrors DOMNodeInserted event.
|
|
|
|
type EventChildNodeInserted struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
|
|
|
|
PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
|
|
|
|
Node *cdp.Node `json:"node"` // Inserted node data.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventChildNodeRemoved mirrors DOMNodeRemoved event.
|
|
|
|
type EventChildNodeRemoved struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
|
|
|
|
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has been removed.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventShadowRootPushed called when shadow root is pushed into the element.
|
|
|
|
type EventShadowRootPushed struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
HostID cdp.NodeID `json:"hostId"` // Host element id.
|
|
|
|
Root *cdp.Node `json:"root"` // Shadow root.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventShadowRootPopped called when shadow root is popped from the element.
|
|
|
|
type EventShadowRootPopped struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
HostID cdp.NodeID `json:"hostId"` // Host element id.
|
|
|
|
RootID cdp.NodeID `json:"rootId"` // Shadow root id.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventPseudoElementAdded called when a pseudo element is added to an
|
|
|
|
// element.
|
|
|
|
type EventPseudoElementAdded struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
|
|
|
|
PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventPseudoElementRemoved called when a pseudo element is removed from an
|
|
|
|
// element.
|
|
|
|
type EventPseudoElementRemoved struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
|
|
|
|
PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-03-02 03:24:35 +00:00
|
|
|
// EventDistributedNodesUpdated called when distribution is changed.
|
2017-01-24 15:09:23 +00:00
|
|
|
type EventDistributedNodesUpdated struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
InsertionPointID cdp.NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
|
|
|
|
DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
// EventTypes all event types in the domain.
|
|
|
|
var EventTypes = []cdp.MethodType{
|
|
|
|
cdp.EventDOMDocumentUpdated,
|
|
|
|
cdp.EventDOMSetChildNodes,
|
|
|
|
cdp.EventDOMAttributeModified,
|
|
|
|
cdp.EventDOMAttributeRemoved,
|
|
|
|
cdp.EventDOMInlineStyleInvalidated,
|
|
|
|
cdp.EventDOMCharacterDataModified,
|
|
|
|
cdp.EventDOMChildNodeCountUpdated,
|
|
|
|
cdp.EventDOMChildNodeInserted,
|
|
|
|
cdp.EventDOMChildNodeRemoved,
|
|
|
|
cdp.EventDOMShadowRootPushed,
|
|
|
|
cdp.EventDOMShadowRootPopped,
|
|
|
|
cdp.EventDOMPseudoElementAdded,
|
|
|
|
cdp.EventDOMPseudoElementRemoved,
|
|
|
|
cdp.EventDOMDistributedNodesUpdated,
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|