cdp_protocol/
dom_debugger.rs

1// Auto-generated from Chrome at version 143.0.7499.110 domain: DOMDebugger
2use super::dom;
3use super::runtime;
4#[allow(unused_imports)]
5use super::types::*;
6#[allow(unused_imports)]
7use serde::{Deserialize, Serialize};
8#[allow(unused_imports)]
9use serde_json::Value as Json;
10#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
11pub enum DomBreakpointType {
12    #[serde(rename = "subtree-modified")]
13    SubtreeModified,
14    #[serde(rename = "attribute-modified")]
15    AttributeModified,
16    #[serde(rename = "node-removed")]
17    NodeRemoved,
18}
19#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
20pub enum CspViolationType {
21    #[serde(rename = "trustedtype-sink-violation")]
22    TrustedtypeSinkViolation,
23    #[serde(rename = "trustedtype-policy-violation")]
24    TrustedtypePolicyViolation,
25}
26#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
27pub struct EventListener {
28    #[serde(default)]
29    #[serde(rename = "type")]
30    pub r#type: String,
31    #[serde(default)]
32    #[serde(rename = "useCapture")]
33    pub use_capture: bool,
34    #[serde(default)]
35    #[serde(rename = "passive")]
36    pub passive: bool,
37    #[serde(default)]
38    #[serde(rename = "once")]
39    pub once: bool,
40    #[serde(rename = "scriptId")]
41    pub script_id: runtime::ScriptId,
42    #[serde(default)]
43    #[serde(rename = "lineNumber")]
44    pub line_number: JsUInt,
45    #[serde(default)]
46    #[serde(rename = "columnNumber")]
47    pub column_number: JsUInt,
48    #[serde(skip_serializing_if = "Option::is_none")]
49    #[serde(rename = "handler")]
50    pub handler: Option<runtime::RemoteObject>,
51    #[serde(skip_serializing_if = "Option::is_none")]
52    #[serde(rename = "originalHandler")]
53    pub original_handler: Option<runtime::RemoteObject>,
54    #[serde(skip_serializing_if = "Option::is_none")]
55    #[serde(rename = "backendNodeId")]
56    pub backend_node_id: Option<dom::BackendNodeId>,
57}
58#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
59pub struct GetEventListeners {
60    #[serde(rename = "objectId")]
61    pub object_id: runtime::RemoteObjectId,
62    #[serde(skip_serializing_if = "Option::is_none")]
63    #[serde(default)]
64    #[serde(rename = "depth")]
65    pub depth: Option<JsUInt>,
66    #[serde(skip_serializing_if = "Option::is_none")]
67    #[serde(default)]
68    #[serde(rename = "pierce")]
69    pub pierce: Option<bool>,
70}
71#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
72pub struct RemoveDOMBreakpoint {
73    #[serde(rename = "nodeId")]
74    pub node_id: dom::NodeId,
75    #[serde(rename = "type")]
76    pub r#type: DomBreakpointType,
77}
78#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
79pub struct RemoveEventListenerBreakpoint {
80    #[serde(default)]
81    #[serde(rename = "eventName")]
82    pub event_name: String,
83    #[serde(skip_serializing_if = "Option::is_none")]
84    #[serde(default)]
85    #[serde(rename = "targetName")]
86    pub target_name: Option<String>,
87}
88#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
89pub struct RemoveInstrumentationBreakpoint {
90    #[serde(default)]
91    #[serde(rename = "eventName")]
92    pub event_name: String,
93}
94#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
95pub struct RemoveXHRBreakpoint {
96    #[serde(default)]
97    #[serde(rename = "url")]
98    pub url: String,
99}
100#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
101pub struct SetBreakOnCSPViolation {
102    #[serde(rename = "violationTypes")]
103    pub violation_types: Vec<CspViolationType>,
104}
105#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
106pub struct SetDOMBreakpoint {
107    #[serde(rename = "nodeId")]
108    pub node_id: dom::NodeId,
109    #[serde(rename = "type")]
110    pub r#type: DomBreakpointType,
111}
112#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
113pub struct SetEventListenerBreakpoint {
114    #[serde(default)]
115    #[serde(rename = "eventName")]
116    pub event_name: String,
117    #[serde(skip_serializing_if = "Option::is_none")]
118    #[serde(default)]
119    #[serde(rename = "targetName")]
120    pub target_name: Option<String>,
121}
122#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
123pub struct SetInstrumentationBreakpoint {
124    #[serde(default)]
125    #[serde(rename = "eventName")]
126    pub event_name: String,
127}
128#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
129pub struct SetXHRBreakpoint {
130    #[serde(default)]
131    #[serde(rename = "url")]
132    pub url: String,
133}
134#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
135pub struct GetEventListenersReturnObject {
136    #[serde(rename = "listeners")]
137    pub listeners: Vec<EventListener>,
138}
139#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
140#[serde(rename_all = "camelCase")]
141pub struct RemoveDOMBreakpointReturnObject {}
142#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
143#[serde(rename_all = "camelCase")]
144pub struct RemoveEventListenerBreakpointReturnObject {}
145#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
146#[serde(rename_all = "camelCase")]
147pub struct RemoveInstrumentationBreakpointReturnObject {}
148#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
149#[serde(rename_all = "camelCase")]
150pub struct RemoveXHRBreakpointReturnObject {}
151#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
152#[serde(rename_all = "camelCase")]
153pub struct SetBreakOnCSPViolationReturnObject {}
154#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
155#[serde(rename_all = "camelCase")]
156pub struct SetDOMBreakpointReturnObject {}
157#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
158#[serde(rename_all = "camelCase")]
159pub struct SetEventListenerBreakpointReturnObject {}
160#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
161#[serde(rename_all = "camelCase")]
162pub struct SetInstrumentationBreakpointReturnObject {}
163#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
164#[serde(rename_all = "camelCase")]
165pub struct SetXHRBreakpointReturnObject {}
166impl Method for GetEventListeners {
167    const NAME: &'static str = "DOMDebugger.getEventListeners";
168    type ReturnObject = GetEventListenersReturnObject;
169}
170impl Method for RemoveDOMBreakpoint {
171    const NAME: &'static str = "DOMDebugger.removeDOMBreakpoint";
172    type ReturnObject = RemoveDOMBreakpointReturnObject;
173}
174impl Method for RemoveEventListenerBreakpoint {
175    const NAME: &'static str = "DOMDebugger.removeEventListenerBreakpoint";
176    type ReturnObject = RemoveEventListenerBreakpointReturnObject;
177}
178impl Method for RemoveInstrumentationBreakpoint {
179    const NAME: &'static str = "DOMDebugger.removeInstrumentationBreakpoint";
180    type ReturnObject = RemoveInstrumentationBreakpointReturnObject;
181}
182impl Method for RemoveXHRBreakpoint {
183    const NAME: &'static str = "DOMDebugger.removeXHRBreakpoint";
184    type ReturnObject = RemoveXHRBreakpointReturnObject;
185}
186impl Method for SetBreakOnCSPViolation {
187    const NAME: &'static str = "DOMDebugger.setBreakOnCSPViolation";
188    type ReturnObject = SetBreakOnCSPViolationReturnObject;
189}
190impl Method for SetDOMBreakpoint {
191    const NAME: &'static str = "DOMDebugger.setDOMBreakpoint";
192    type ReturnObject = SetDOMBreakpointReturnObject;
193}
194impl Method for SetEventListenerBreakpoint {
195    const NAME: &'static str = "DOMDebugger.setEventListenerBreakpoint";
196    type ReturnObject = SetEventListenerBreakpointReturnObject;
197}
198impl Method for SetInstrumentationBreakpoint {
199    const NAME: &'static str = "DOMDebugger.setInstrumentationBreakpoint";
200    type ReturnObject = SetInstrumentationBreakpointReturnObject;
201}
202impl Method for SetXHRBreakpoint {
203    const NAME: &'static str = "DOMDebugger.setXHRBreakpoint";
204    type ReturnObject = SetXHRBreakpointReturnObject;
205}
206pub mod events {
207    #[allow(unused_imports)]
208    use super::super::types::*;
209    #[allow(unused_imports)]
210    use serde::{Deserialize, Serialize};
211}