events.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. // EventScrollableFlagUpdated fired when a node's scrollability state
  83. // changes.
  84. //
  85. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-scrollableFlagUpdated
  86. type EventScrollableFlagUpdated struct {
  87. NodeID cdp.NodeID `json:"nodeId"` // The id of the node.
  88. IsScrollable bool `json:"isScrollable"` // If the node is scrollable.
  89. }
  90. // EventPseudoElementRemoved called when a pseudo element is removed from an
  91. // element.
  92. //
  93. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementRemoved
  94. type EventPseudoElementRemoved struct {
  95. ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
  96. PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
  97. }
  98. // EventSetChildNodes fired when backend wants to provide client with the
  99. // missing DOM structure. This happens upon most of the calls requesting node
  100. // ids.
  101. //
  102. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-setChildNodes
  103. type EventSetChildNodes struct {
  104. ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
  105. Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
  106. }
  107. // EventShadowRootPopped called when shadow root is popped from the element.
  108. //
  109. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPopped
  110. type EventShadowRootPopped struct {
  111. HostID cdp.NodeID `json:"hostId"` // Host element id.
  112. RootID cdp.NodeID `json:"rootId"` // Shadow root id.
  113. }
  114. // EventShadowRootPushed called when shadow root is pushed into the element.
  115. //
  116. // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPushed
  117. type EventShadowRootPushed struct {
  118. HostID cdp.NodeID `json:"hostId"` // Host element id.
  119. Root *cdp.Node `json:"root"` // Shadow root.
  120. }