chromedp/cdp/dom/events.go

128 lines
5.1 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
package dom
// AUTOGENERATED. DO NOT EDIT.
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{}
// EventInspectNodeRequested fired when the node should be inspected. This
// happens after call to setInspectMode.
type EventInspectNodeRequested struct {
2017-01-26 07:28:34 +00:00
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Id of the node to inspect.
2017-01-24 15:09:23 +00:00
}
// 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-01-26 07:28:34 +00:00
ParentID cdp.NodeID `json:"parentId,omitempty"` // Parent node id to populate with children.
Nodes []*cdp.Node `json:"nodes,omitempty"` // Child nodes array.
2017-01-24 15:09:23 +00:00
}
// EventAttributeModified fired when Element's attribute is modified.
type EventAttributeModified struct {
2017-01-26 07:28:34 +00:00
NodeID cdp.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.
2017-01-24 15:09:23 +00:00
}
// EventAttributeRemoved fired when Element's attribute is removed.
type EventAttributeRemoved struct {
2017-01-26 07:28:34 +00:00
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
Name string `json:"name,omitempty"` // 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-01-26 07:28:34 +00:00
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // 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-01-26 07:28:34 +00:00
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
CharacterData string `json:"characterData,omitempty"` // 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-01-26 07:28:34 +00:00
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // New node count.
2017-01-24 15:09:23 +00:00
}
// EventChildNodeInserted mirrors DOMNodeInserted event.
type EventChildNodeInserted struct {
2017-01-26 07:28:34 +00:00
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Id of the node that has changed.
PreviousNodeID cdp.NodeID `json:"previousNodeId,omitempty"` // If of the previous siblint.
Node *cdp.Node `json:"node,omitempty"` // Inserted node data.
2017-01-24 15:09:23 +00:00
}
// EventChildNodeRemoved mirrors DOMNodeRemoved event.
type EventChildNodeRemoved struct {
2017-01-26 07:28:34 +00:00
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Parent id.
NodeID cdp.NodeID `json:"nodeId,omitempty"` // 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-01-26 07:28:34 +00:00
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id.
Root *cdp.Node `json:"root,omitempty"` // Shadow root.
2017-01-24 15:09:23 +00:00
}
// EventShadowRootPopped called when shadow root is popped from the element.
type EventShadowRootPopped struct {
2017-01-26 07:28:34 +00:00
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id.
RootID cdp.NodeID `json:"rootId,omitempty"` // 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-01-26 07:28:34 +00:00
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
PseudoElement *cdp.Node `json:"pseudoElement,omitempty"` // 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-01-26 07:28:34 +00:00
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
PseudoElementID cdp.NodeID `json:"pseudoElementId,omitempty"` // The removed pseudo element id.
2017-01-24 15:09:23 +00:00
}
// EventDistributedNodesUpdated called when distribution is changed.
2017-01-24 15:09:23 +00:00
type EventDistributedNodesUpdated struct {
InsertionPointID cdp.NodeID `json:"insertionPointId,omitempty"` // Insertion point where distributed nodes were updated.
2017-01-26 07:28:34 +00:00
DistributedNodes []*cdp.BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
2017-01-24 15:09:23 +00:00
}
2017-01-26 07:28:34 +00:00
// EventNodeHighlightRequested [no description].
2017-01-24 15:09:23 +00:00
type EventNodeHighlightRequested struct {
2017-01-26 07:28:34 +00:00
NodeID cdp.NodeID `json:"nodeId,omitempty"`
}
// EventTypes all event types in the domain.
var EventTypes = []cdp.MethodType{
cdp.EventDOMDocumentUpdated,
cdp.EventDOMInspectNodeRequested,
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,
cdp.EventDOMNodeHighlightRequested,
2017-01-24 15:09:23 +00:00
}