events.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. package dom
  2. // Code generated by cdproto-gen. DO NOT EDIT.
  3. import (
  4. "github.com/chromedp/cdproto/cdp"
  5. )
  6. // EventAttributeModified fired when Element's attribute is modified.
  7. //
  8. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeModified
  9. type EventAttributeModified struct {
  10. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
  11. Name string `json:"name"` // Attribute name.
  12. Value string `json:"value"` // Attribute value.
  13. }
  14. // EventAttributeRemoved fired when Element's attribute is removed.
  15. //
  16. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeRemoved
  17. type EventAttributeRemoved struct {
  18. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
  19. Name string `json:"name"` // A ttribute name.
  20. }
  21. // EventCharacterDataModified mirrors DOMCharacterDataModified event.
  22. //
  23. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-characterDataModified
  24. type EventCharacterDataModified struct {
  25. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
  26. CharacterData string `json:"characterData"` // New text value.
  27. }
  28. // EventChildNodeCountUpdated fired when Container's child node count has
  29. // changed.
  30. //
  31. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeCountUpdated
  32. type EventChildNodeCountUpdated struct {
  33. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
  34. ChildNodeCount int64 `json:"childNodeCount"` // New node count.
  35. }
  36. // EventChildNodeInserted mirrors DOMNodeInserted event.
  37. //
  38. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted
  39. type EventChildNodeInserted struct {
  40. ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
  41. PreviousNodeID cdp.NodeID `json:"previousNodeId"` // Id of the previous sibling.
  42. Node *cdp.Node `json:"node"` // Inserted node data.
  43. }
  44. // EventChildNodeRemoved mirrors DOMNodeRemoved event.
  45. //
  46. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeRemoved
  47. type EventChildNodeRemoved struct {
  48. ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
  49. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has been removed.
  50. }
  51. // EventDistributedNodesUpdated called when distribution is changed.
  52. //
  53. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-distributedNodesUpdated
  54. type EventDistributedNodesUpdated struct {
  55. InsertionPointID cdp.NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
  56. DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
  57. }
  58. // EventDocumentUpdated fired when Document has been totally updated. Node
  59. // ids are no longer valid.
  60. //
  61. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-documentUpdated
  62. type EventDocumentUpdated struct{}
  63. // EventInlineStyleInvalidated fired when Element's inline style is modified
  64. // via a CSS property modification.
  65. //
  66. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated
  67. type EventInlineStyleInvalidated struct {
  68. NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
  69. }
  70. // EventPseudoElementAdded called when a pseudo element is added to an
  71. // element.
  72. //
  73. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementAdded
  74. type EventPseudoElementAdded struct {
  75. ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
  76. PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
  77. }
  78. // EventTopLayerElementsUpdated called when top layer elements are changed.
  79. //
  80. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-topLayerElementsUpdated
  81. type EventTopLayerElementsUpdated struct{}
  82. // EventPseudoElementRemoved called when a pseudo element is removed from an
  83. // element.
  84. //
  85. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementRemoved
  86. type EventPseudoElementRemoved struct {
  87. ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
  88. PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
  89. }
  90. // EventSetChildNodes fired when backend wants to provide client with the
  91. // missing DOM structure. This happens upon most of the calls requesting node
  92. // ids.
  93. //
  94. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-setChildNodes
  95. type EventSetChildNodes struct {
  96. ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
  97. Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
  98. }
  99. // EventShadowRootPopped called when shadow root is popped from the element.
  100. //
  101. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPopped
  102. type EventShadowRootPopped struct {
  103. HostID cdp.NodeID `json:"hostId"` // Host element id.
  104. RootID cdp.NodeID `json:"rootId"` // Shadow root id.
  105. }
  106. // EventShadowRootPushed called when shadow root is pushed into the element.
  107. //
  108. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPushed
  109. type EventShadowRootPushed struct {
  110. HostID cdp.NodeID `json:"hostId"` // Host element id.
  111. Root *cdp.Node `json:"root"` // Shadow root.
  112. }