1#![allow(dead_code)]
3use super::dom;
4use super::page;
5use super::runtime;
6#[allow(unused_imports)]
7use super::types::*;
8#[allow(unused_imports)]
9use derive_builder::Builder;
10#[allow(unused_imports)]
11use serde::{Deserialize, Serialize};
12#[allow(unused_imports)]
13use serde_json::Value as Json;
14pub type NodeId = JsUInt;
15pub type BackendNodeId = JsUInt;
16pub type StyleSheetId = String;
17pub type Quad = Vec<JsFloat>;
18#[allow(deprecated)]
19#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
20pub enum PseudoType {
21 #[serde(rename = "first-line")]
22 FirstLine,
23 #[serde(rename = "first-letter")]
24 FirstLetter,
25 #[serde(rename = "checkmark")]
26 Checkmark,
27 #[serde(rename = "before")]
28 Before,
29 #[serde(rename = "after")]
30 After,
31 #[serde(rename = "picker-icon")]
32 PickerIcon,
33 #[serde(rename = "interest-hint")]
34 InterestHint,
35 #[serde(rename = "marker")]
36 Marker,
37 #[serde(rename = "backdrop")]
38 Backdrop,
39 #[serde(rename = "column")]
40 Column,
41 #[serde(rename = "selection")]
42 Selection,
43 #[serde(rename = "search-text")]
44 SearchText,
45 #[serde(rename = "target-text")]
46 TargetText,
47 #[serde(rename = "spelling-error")]
48 SpellingError,
49 #[serde(rename = "grammar-error")]
50 GrammarError,
51 #[serde(rename = "highlight")]
52 Highlight,
53 #[serde(rename = "first-line-inherited")]
54 FirstLineInherited,
55 #[serde(rename = "scroll-marker")]
56 ScrollMarker,
57 #[serde(rename = "scroll-marker-group")]
58 ScrollMarkerGroup,
59 #[serde(rename = "scroll-button")]
60 ScrollButton,
61 #[serde(rename = "scrollbar")]
62 Scrollbar,
63 #[serde(rename = "scrollbar-thumb")]
64 ScrollbarThumb,
65 #[serde(rename = "scrollbar-button")]
66 ScrollbarButton,
67 #[serde(rename = "scrollbar-track")]
68 ScrollbarTrack,
69 #[serde(rename = "scrollbar-track-piece")]
70 ScrollbarTrackPiece,
71 #[serde(rename = "scrollbar-corner")]
72 ScrollbarCorner,
73 #[serde(rename = "resizer")]
74 Resizer,
75 #[serde(rename = "input-list-button")]
76 InputListButton,
77 #[serde(rename = "view-transition")]
78 ViewTransition,
79 #[serde(rename = "view-transition-group")]
80 ViewTransitionGroup,
81 #[serde(rename = "view-transition-image-pair")]
82 ViewTransitionImagePair,
83 #[serde(rename = "view-transition-group-children")]
84 ViewTransitionGroupChildren,
85 #[serde(rename = "view-transition-old")]
86 ViewTransitionOld,
87 #[serde(rename = "view-transition-new")]
88 ViewTransitionNew,
89 #[serde(rename = "placeholder")]
90 Placeholder,
91 #[serde(rename = "file-selector-button")]
92 FileSelectorButton,
93 #[serde(rename = "details-content")]
94 DetailsContent,
95 #[serde(rename = "picker")]
96 Picker,
97 #[serde(rename = "permission-icon")]
98 PermissionIcon,
99 #[serde(rename = "overscroll-area-parent")]
100 OverscrollAreaParent,
101}
102#[allow(deprecated)]
103#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
104pub enum ShadowRootType {
105 #[serde(rename = "user-agent")]
106 UserAgent,
107 #[serde(rename = "open")]
108 Open,
109 #[serde(rename = "closed")]
110 Closed,
111}
112#[allow(deprecated)]
113#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
114pub enum CompatibilityMode {
115 #[serde(rename = "QuirksMode")]
116 QuirksMode,
117 #[serde(rename = "LimitedQuirksMode")]
118 LimitedQuirksMode,
119 #[serde(rename = "NoQuirksMode")]
120 NoQuirksMode,
121}
122#[allow(deprecated)]
123#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
124pub enum PhysicalAxes {
125 #[serde(rename = "Horizontal")]
126 Horizontal,
127 #[serde(rename = "Vertical")]
128 Vertical,
129 #[serde(rename = "Both")]
130 Both,
131}
132#[allow(deprecated)]
133#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
134pub enum LogicalAxes {
135 #[serde(rename = "Inline")]
136 Inline,
137 #[serde(rename = "Block")]
138 Block,
139 #[serde(rename = "Both")]
140 Both,
141}
142#[allow(deprecated)]
143#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
144pub enum ScrollOrientation {
145 #[serde(rename = "horizontal")]
146 Horizontal,
147 #[serde(rename = "vertical")]
148 Vertical,
149}
150#[allow(deprecated)]
151#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
152pub enum EnableIncludeWhitespaceOption {
153 #[serde(rename = "none")]
154 None,
155 #[serde(rename = "all")]
156 All,
157}
158#[allow(deprecated)]
159#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
160pub enum GetElementByRelationRelationOption {
161 #[serde(rename = "PopoverTarget")]
162 PopoverTarget,
163 #[serde(rename = "InterestTarget")]
164 InterestTarget,
165 #[serde(rename = "CommandFor")]
166 CommandFor,
167}
168#[allow(deprecated)]
169#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
170#[builder(setter(into, strip_option))]
171#[serde(rename_all = "camelCase")]
172#[doc = "Backend node with a friendly name."]
173pub struct BackendNode {
174 #[serde(default)]
175 #[doc = "`Node`'s nodeType."]
176 pub node_type: JsUInt,
177 #[serde(default)]
178 #[doc = "`Node`'s nodeName."]
179 pub node_name: String,
180 pub backend_node_id: BackendNodeId,
181}
182#[allow(deprecated)]
183#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
184#[builder(setter(into, strip_option))]
185#[serde(rename_all = "camelCase")]
186#[doc = "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.\n DOMNode is a base node mirror type."]
187pub struct Node {
188 #[doc = "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend\n will only push node with given `id` once. It is aware of all requested nodes and will only\n fire DOM events for nodes known to the client."]
189 pub node_id: NodeId,
190 #[builder(default)]
191 #[serde(skip_serializing_if = "Option::is_none")]
192 #[doc = "The id of the parent node if any."]
193 pub parent_id: Option<NodeId>,
194 #[doc = "The BackendNodeId for this node."]
195 pub backend_node_id: BackendNodeId,
196 #[serde(default)]
197 #[doc = "`Node`'s nodeType."]
198 pub node_type: JsUInt,
199 #[serde(default)]
200 #[doc = "`Node`'s nodeName."]
201 pub node_name: String,
202 #[serde(default)]
203 #[doc = "`Node`'s localName."]
204 pub local_name: String,
205 #[serde(default)]
206 #[doc = "`Node`'s nodeValue."]
207 pub node_value: String,
208 #[builder(default)]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 #[serde(default)]
211 #[doc = "Child count for `Container` nodes."]
212 pub child_node_count: Option<JsUInt>,
213 #[builder(default)]
214 #[serde(skip_serializing_if = "Option::is_none")]
215 #[doc = "Child nodes of this node when requested with children."]
216 pub children: Option<Vec<Node>>,
217 #[builder(default)]
218 #[serde(skip_serializing_if = "Option::is_none")]
219 #[serde(default)]
220 #[doc = "Attributes of the `Element` node in the form of flat array `\\[name1, value1, name2, value2\\]`."]
221 pub attributes: Option<Vec<String>>,
222 #[builder(default)]
223 #[serde(skip_serializing_if = "Option::is_none")]
224 #[serde(default)]
225 #[doc = "Document URL that `Document` or `FrameOwner` node points to."]
226 #[serde(rename = "documentURL")]
227 pub document_url: Option<String>,
228 #[builder(default)]
229 #[serde(skip_serializing_if = "Option::is_none")]
230 #[serde(default)]
231 #[doc = "Base URL that `Document` or `FrameOwner` node uses for URL completion."]
232 #[serde(rename = "baseURL")]
233 pub base_url: Option<String>,
234 #[builder(default)]
235 #[serde(skip_serializing_if = "Option::is_none")]
236 #[serde(default)]
237 #[doc = "`DocumentType`'s publicId."]
238 pub public_id: Option<String>,
239 #[builder(default)]
240 #[serde(skip_serializing_if = "Option::is_none")]
241 #[serde(default)]
242 #[doc = "`DocumentType`'s systemId."]
243 pub system_id: Option<String>,
244 #[builder(default)]
245 #[serde(skip_serializing_if = "Option::is_none")]
246 #[serde(default)]
247 #[doc = "`DocumentType`'s internalSubset."]
248 pub internal_subset: Option<String>,
249 #[builder(default)]
250 #[serde(skip_serializing_if = "Option::is_none")]
251 #[serde(default)]
252 #[doc = "`Document`'s XML version in case of XML documents."]
253 pub xml_version: Option<String>,
254 #[builder(default)]
255 #[serde(skip_serializing_if = "Option::is_none")]
256 #[serde(default)]
257 #[doc = "`Attr`'s name."]
258 pub name: Option<String>,
259 #[builder(default)]
260 #[serde(skip_serializing_if = "Option::is_none")]
261 #[serde(default)]
262 #[doc = "`Attr`'s value."]
263 pub value: Option<String>,
264 #[builder(default)]
265 #[serde(skip_serializing_if = "Option::is_none")]
266 #[doc = "Pseudo element type for this node."]
267 pub pseudo_type: Option<PseudoType>,
268 #[builder(default)]
269 #[serde(skip_serializing_if = "Option::is_none")]
270 #[serde(default)]
271 #[doc = "Pseudo element identifier for this node. Only present if there is a\n valid pseudoType."]
272 pub pseudo_identifier: Option<String>,
273 #[builder(default)]
274 #[serde(skip_serializing_if = "Option::is_none")]
275 #[doc = "Shadow root type."]
276 pub shadow_root_type: Option<ShadowRootType>,
277 #[builder(default)]
278 #[serde(skip_serializing_if = "Option::is_none")]
279 #[doc = "Frame ID for frame owner elements."]
280 pub frame_id: Option<page::FrameId>,
281 #[builder(default)]
282 #[serde(skip_serializing_if = "Option::is_none")]
283 #[doc = "Content document for frame owner elements."]
284 pub content_document: Option<Box<Node>>,
285 #[builder(default)]
286 #[serde(skip_serializing_if = "Option::is_none")]
287 #[doc = "Shadow root list for given element host."]
288 pub shadow_roots: Option<Vec<Node>>,
289 #[builder(default)]
290 #[serde(skip_serializing_if = "Option::is_none")]
291 #[doc = "Content document fragment for template elements."]
292 pub template_content: Option<Box<Node>>,
293 #[builder(default)]
294 #[serde(skip_serializing_if = "Option::is_none")]
295 #[doc = "Pseudo elements associated with this node."]
296 pub pseudo_elements: Option<Vec<Node>>,
297 #[builder(default)]
298 #[serde(skip_serializing_if = "Option::is_none")]
299 #[doc = "Deprecated, as the HTML Imports API has been removed (crbug.com/937746).\n This property used to return the imported document for the HTMLImport links.\n The property is always undefined now."]
300 #[deprecated]
301 pub imported_document: Option<Box<Node>>,
302 #[builder(default)]
303 #[serde(skip_serializing_if = "Option::is_none")]
304 #[doc = "Distributed nodes for given insertion point."]
305 pub distributed_nodes: Option<Vec<BackendNode>>,
306 #[builder(default)]
307 #[serde(skip_serializing_if = "Option::is_none")]
308 #[serde(default)]
309 #[doc = "Whether the node is SVG."]
310 #[serde(rename = "isSVG")]
311 pub is_svg: Option<bool>,
312 #[builder(default)]
313 #[serde(skip_serializing_if = "Option::is_none")]
314 pub compatibility_mode: Option<CompatibilityMode>,
315 #[builder(default)]
316 #[serde(skip_serializing_if = "Option::is_none")]
317 pub assigned_slot: Option<BackendNode>,
318 #[builder(default)]
319 #[serde(skip_serializing_if = "Option::is_none")]
320 #[serde(default)]
321 pub is_scrollable: Option<bool>,
322 #[builder(default)]
323 #[serde(skip_serializing_if = "Option::is_none")]
324 #[serde(default)]
325 pub affected_by_starting_styles: Option<bool>,
326 #[builder(default)]
327 #[serde(skip_serializing_if = "Option::is_none")]
328 pub adopted_style_sheets: Option<Vec<StyleSheetId>>,
329}
330#[allow(deprecated)]
331#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
332#[builder(setter(into, strip_option))]
333#[serde(rename_all = "camelCase")]
334#[doc = "A structure to hold the top-level node of a detached tree and an array of its retained descendants."]
335pub struct DetachedElementInfo {
336 pub tree_node: Node,
337 pub retained_node_ids: Vec<NodeId>,
338}
339#[allow(deprecated)]
340#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
341#[builder(setter(into, strip_option))]
342#[serde(rename_all = "camelCase")]
343#[doc = "A structure holding an RGBA color."]
344pub struct Rgba {
345 #[serde(default)]
346 #[doc = "The red component, in the \\[0-255\\] range."]
347 pub r: JsUInt,
348 #[serde(default)]
349 #[doc = "The green component, in the \\[0-255\\] range."]
350 pub g: JsUInt,
351 #[serde(default)]
352 #[doc = "The blue component, in the \\[0-255\\] range."]
353 pub b: JsUInt,
354 #[builder(default)]
355 #[serde(skip_serializing_if = "Option::is_none")]
356 #[serde(default)]
357 #[doc = "The alpha component, in the \\[0-1\\] range (default: 1)."]
358 pub a: Option<JsFloat>,
359}
360#[allow(deprecated)]
361#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
362#[builder(setter(into, strip_option))]
363#[serde(rename_all = "camelCase")]
364#[doc = "Box model."]
365pub struct BoxModel {
366 #[doc = "Content box"]
367 pub content: Quad,
368 #[doc = "Padding box"]
369 pub padding: Quad,
370 #[doc = "Border box"]
371 pub border: Quad,
372 #[doc = "Margin box"]
373 pub margin: Quad,
374 #[serde(default)]
375 #[doc = "Node width"]
376 pub width: JsUInt,
377 #[serde(default)]
378 #[doc = "Node height"]
379 pub height: JsUInt,
380 #[builder(default)]
381 #[serde(skip_serializing_if = "Option::is_none")]
382 #[doc = "Shape outside coordinates"]
383 pub shape_outside: Option<ShapeOutsideInfo>,
384}
385#[allow(deprecated)]
386#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
387#[builder(setter(into, strip_option))]
388#[serde(rename_all = "camelCase")]
389#[doc = "CSS Shape Outside details."]
390pub struct ShapeOutsideInfo {
391 #[doc = "Shape bounds"]
392 pub bounds: Quad,
393 #[serde(default)]
394 #[doc = "Shape coordinate details"]
395 pub shape: Vec<Json>,
396 #[serde(default)]
397 #[doc = "Margin shape bounds"]
398 pub margin_shape: Vec<Json>,
399}
400#[allow(deprecated)]
401#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
402#[builder(setter(into, strip_option))]
403#[serde(rename_all = "camelCase")]
404#[doc = "Rectangle."]
405pub struct Rect {
406 #[serde(default)]
407 #[doc = "X coordinate"]
408 pub x: JsFloat,
409 #[serde(default)]
410 #[doc = "Y coordinate"]
411 pub y: JsFloat,
412 #[serde(default)]
413 #[doc = "Rectangle width"]
414 pub width: JsFloat,
415 #[serde(default)]
416 #[doc = "Rectangle height"]
417 pub height: JsFloat,
418}
419#[allow(deprecated)]
420#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
421#[builder(setter(into, strip_option))]
422#[serde(rename_all = "camelCase")]
423pub struct CssComputedStyleProperty {
424 #[serde(default)]
425 #[doc = "Computed style property name."]
426 pub name: String,
427 #[serde(default)]
428 #[doc = "Computed style property value."]
429 pub value: String,
430}
431#[allow(deprecated)]
432#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
433#[builder(setter(into, strip_option))]
434#[serde(rename_all = "camelCase")]
435#[doc = "Collects class names for the node with given id and all of it's child nodes."]
436pub struct CollectClassNamesFromSubtree {
437 #[doc = "Id of the node to collect class names."]
438 pub node_id: NodeId,
439}
440#[allow(deprecated)]
441#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
442#[builder(setter(into, strip_option))]
443#[serde(rename_all = "camelCase")]
444#[doc = "Creates a deep copy of the specified node and places it into the target container before the\n given anchor."]
445pub struct CopyTo {
446 #[doc = "Id of the node to copy."]
447 pub node_id: NodeId,
448 #[doc = "Id of the element to drop the copy into."]
449 pub target_node_id: NodeId,
450 #[builder(default)]
451 #[serde(skip_serializing_if = "Option::is_none")]
452 #[doc = "Drop the copy before this node (if absent, the copy becomes the last child of\n `targetNodeId`)."]
453 pub insert_before_node_id: Option<NodeId>,
454}
455#[allow(deprecated)]
456#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
457#[builder(setter(into, strip_option))]
458#[serde(rename_all = "camelCase")]
459#[doc = "Describes node given its id, does not require domain to be enabled. Does not start tracking any\n objects, can be used for automation."]
460pub struct DescribeNode {
461 #[builder(default)]
462 #[serde(skip_serializing_if = "Option::is_none")]
463 #[doc = "Identifier of the node."]
464 pub node_id: Option<NodeId>,
465 #[builder(default)]
466 #[serde(skip_serializing_if = "Option::is_none")]
467 #[doc = "Identifier of the backend node."]
468 pub backend_node_id: Option<BackendNodeId>,
469 #[builder(default)]
470 #[serde(skip_serializing_if = "Option::is_none")]
471 #[doc = "JavaScript object id of the node wrapper."]
472 pub object_id: Option<runtime::RemoteObjectId>,
473 #[builder(default)]
474 #[serde(skip_serializing_if = "Option::is_none")]
475 #[serde(default)]
476 #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\n entire subtree or provide an integer larger than 0."]
477 pub depth: Option<JsUInt>,
478 #[builder(default)]
479 #[serde(skip_serializing_if = "Option::is_none")]
480 #[serde(default)]
481 #[doc = "Whether or not iframes and shadow roots should be traversed when returning the subtree\n (default is false)."]
482 pub pierce: Option<bool>,
483}
484#[allow(deprecated)]
485#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
486#[builder(setter(into, strip_option))]
487#[serde(rename_all = "camelCase")]
488#[doc = "Scrolls the specified rect of the given node into view if not already visible.\n Note: exactly one between nodeId, backendNodeId and objectId should be passed\n to identify the node."]
489pub struct ScrollIntoViewIfNeeded {
490 #[builder(default)]
491 #[serde(skip_serializing_if = "Option::is_none")]
492 #[doc = "Identifier of the node."]
493 pub node_id: Option<NodeId>,
494 #[builder(default)]
495 #[serde(skip_serializing_if = "Option::is_none")]
496 #[doc = "Identifier of the backend node."]
497 pub backend_node_id: Option<BackendNodeId>,
498 #[builder(default)]
499 #[serde(skip_serializing_if = "Option::is_none")]
500 #[doc = "JavaScript object id of the node wrapper."]
501 pub object_id: Option<runtime::RemoteObjectId>,
502 #[builder(default)]
503 #[serde(skip_serializing_if = "Option::is_none")]
504 #[doc = "The rect to be scrolled into view, relative to the node's border box, in CSS pixels.\n When omitted, center of the node will be used, similar to Element.scrollIntoView."]
505 pub rect: Option<Rect>,
506}
507#[allow(deprecated)]
508#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
509pub struct Disable(pub Option<Json>);
510#[allow(deprecated)]
511#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
512#[builder(setter(into, strip_option))]
513#[serde(rename_all = "camelCase")]
514#[doc = "Discards search results from the session with the given id. `getSearchResults` should no longer\n be called for that search."]
515pub struct DiscardSearchResults {
516 #[serde(default)]
517 #[doc = "Unique search session identifier."]
518 pub search_id: String,
519}
520#[allow(deprecated)]
521#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
522#[builder(setter(into, strip_option))]
523#[serde(rename_all = "camelCase")]
524#[doc = "Enables DOM agent for the given page."]
525pub struct Enable {
526 #[builder(default)]
527 #[serde(skip_serializing_if = "Option::is_none")]
528 #[doc = "Whether to include whitespaces in the children array of returned Nodes."]
529 pub include_whitespace: Option<EnableIncludeWhitespaceOption>,
530}
531#[allow(deprecated)]
532#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
533#[builder(setter(into, strip_option))]
534#[serde(rename_all = "camelCase")]
535#[doc = "Focuses the given element."]
536pub struct Focus {
537 #[builder(default)]
538 #[serde(skip_serializing_if = "Option::is_none")]
539 #[doc = "Identifier of the node."]
540 pub node_id: Option<NodeId>,
541 #[builder(default)]
542 #[serde(skip_serializing_if = "Option::is_none")]
543 #[doc = "Identifier of the backend node."]
544 pub backend_node_id: Option<BackendNodeId>,
545 #[builder(default)]
546 #[serde(skip_serializing_if = "Option::is_none")]
547 #[doc = "JavaScript object id of the node wrapper."]
548 pub object_id: Option<runtime::RemoteObjectId>,
549}
550#[allow(deprecated)]
551#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
552#[builder(setter(into, strip_option))]
553#[serde(rename_all = "camelCase")]
554#[doc = "Returns attributes for the specified node."]
555pub struct GetAttributes {
556 #[doc = "Id of the node to retrieve attributes for."]
557 pub node_id: NodeId,
558}
559#[allow(deprecated)]
560#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
561#[builder(setter(into, strip_option))]
562#[serde(rename_all = "camelCase")]
563#[doc = "Returns boxes for the given node."]
564pub struct GetBoxModel {
565 #[builder(default)]
566 #[serde(skip_serializing_if = "Option::is_none")]
567 #[doc = "Identifier of the node."]
568 pub node_id: Option<NodeId>,
569 #[builder(default)]
570 #[serde(skip_serializing_if = "Option::is_none")]
571 #[doc = "Identifier of the backend node."]
572 pub backend_node_id: Option<BackendNodeId>,
573 #[builder(default)]
574 #[serde(skip_serializing_if = "Option::is_none")]
575 #[doc = "JavaScript object id of the node wrapper."]
576 pub object_id: Option<runtime::RemoteObjectId>,
577}
578#[allow(deprecated)]
579#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
580#[builder(setter(into, strip_option))]
581#[serde(rename_all = "camelCase")]
582#[doc = "Returns quads that describe node position on the page. This method\n might return multiple quads for inline nodes."]
583pub struct GetContentQuads {
584 #[builder(default)]
585 #[serde(skip_serializing_if = "Option::is_none")]
586 #[doc = "Identifier of the node."]
587 pub node_id: Option<NodeId>,
588 #[builder(default)]
589 #[serde(skip_serializing_if = "Option::is_none")]
590 #[doc = "Identifier of the backend node."]
591 pub backend_node_id: Option<BackendNodeId>,
592 #[builder(default)]
593 #[serde(skip_serializing_if = "Option::is_none")]
594 #[doc = "JavaScript object id of the node wrapper."]
595 pub object_id: Option<runtime::RemoteObjectId>,
596}
597#[allow(deprecated)]
598#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
599#[builder(setter(into, strip_option))]
600#[serde(rename_all = "camelCase")]
601#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\n Implicitly enables the DOM domain events for the current target."]
602pub struct GetDocument {
603 #[builder(default)]
604 #[serde(skip_serializing_if = "Option::is_none")]
605 #[serde(default)]
606 #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\n entire subtree or provide an integer larger than 0."]
607 pub depth: Option<JsUInt>,
608 #[builder(default)]
609 #[serde(skip_serializing_if = "Option::is_none")]
610 #[serde(default)]
611 #[doc = "Whether or not iframes and shadow roots should be traversed when returning the subtree\n (default is false)."]
612 pub pierce: Option<bool>,
613}
614#[allow(deprecated)]
615#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
616#[builder(setter(into, strip_option))]
617#[serde(rename_all = "camelCase")]
618#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\n Deprecated, as it is not designed to work well with the rest of the DOM agent.\n Use DOMSnapshot.captureSnapshot instead."]
619#[deprecated]
620pub struct GetFlattenedDocument {
621 #[builder(default)]
622 #[serde(skip_serializing_if = "Option::is_none")]
623 #[serde(default)]
624 #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\n entire subtree or provide an integer larger than 0."]
625 pub depth: Option<JsUInt>,
626 #[builder(default)]
627 #[serde(skip_serializing_if = "Option::is_none")]
628 #[serde(default)]
629 #[doc = "Whether or not iframes and shadow roots should be traversed when returning the subtree\n (default is false)."]
630 pub pierce: Option<bool>,
631}
632#[allow(deprecated)]
633#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
634#[builder(setter(into, strip_option))]
635#[serde(rename_all = "camelCase")]
636#[doc = "Finds nodes with a given computed style in a subtree."]
637pub struct GetNodesForSubtreeByStyle {
638 #[doc = "Node ID pointing to the root of a subtree."]
639 pub node_id: NodeId,
640 #[doc = "The style to filter nodes by (includes nodes if any of properties matches)."]
641 pub computed_styles: Vec<CssComputedStyleProperty>,
642 #[builder(default)]
643 #[serde(skip_serializing_if = "Option::is_none")]
644 #[serde(default)]
645 #[doc = "Whether or not iframes and shadow roots in the same target should be traversed when returning the\n results (default is false)."]
646 pub pierce: Option<bool>,
647}
648#[allow(deprecated)]
649#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
650#[builder(setter(into, strip_option))]
651#[serde(rename_all = "camelCase")]
652#[doc = "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\n either returned or not."]
653pub struct GetNodeForLocation {
654 #[serde(default)]
655 #[doc = "X coordinate."]
656 pub x: JsUInt,
657 #[serde(default)]
658 #[doc = "Y coordinate."]
659 pub y: JsUInt,
660 #[builder(default)]
661 #[serde(skip_serializing_if = "Option::is_none")]
662 #[serde(default)]
663 #[doc = "False to skip to the nearest non-UA shadow root ancestor (default: false)."]
664 #[serde(rename = "includeUserAgentShadowDOM")]
665 pub include_user_agent_shadow_dom: Option<bool>,
666 #[builder(default)]
667 #[serde(skip_serializing_if = "Option::is_none")]
668 #[serde(default)]
669 #[doc = "Whether to ignore pointer-events: none on elements and hit test them."]
670 pub ignore_pointer_events_none: Option<bool>,
671}
672#[allow(deprecated)]
673#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
674#[builder(setter(into, strip_option))]
675#[serde(rename_all = "camelCase")]
676#[doc = "Returns node's HTML markup."]
677pub struct GetOuterHTML {
678 #[builder(default)]
679 #[serde(skip_serializing_if = "Option::is_none")]
680 #[doc = "Identifier of the node."]
681 pub node_id: Option<NodeId>,
682 #[builder(default)]
683 #[serde(skip_serializing_if = "Option::is_none")]
684 #[doc = "Identifier of the backend node."]
685 pub backend_node_id: Option<BackendNodeId>,
686 #[builder(default)]
687 #[serde(skip_serializing_if = "Option::is_none")]
688 #[doc = "JavaScript object id of the node wrapper."]
689 pub object_id: Option<runtime::RemoteObjectId>,
690 #[builder(default)]
691 #[serde(skip_serializing_if = "Option::is_none")]
692 #[serde(default)]
693 #[doc = "Include all shadow roots. Equals to false if not specified."]
694 #[serde(rename = "includeShadowDOM")]
695 pub include_shadow_dom: Option<bool>,
696}
697#[allow(deprecated)]
698#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
699#[builder(setter(into, strip_option))]
700#[serde(rename_all = "camelCase")]
701#[doc = "Returns the id of the nearest ancestor that is a relayout boundary."]
702pub struct GetRelayoutBoundary {
703 #[doc = "Id of the node."]
704 pub node_id: NodeId,
705}
706#[allow(deprecated)]
707#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
708#[builder(setter(into, strip_option))]
709#[serde(rename_all = "camelCase")]
710#[doc = "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\n identifier."]
711pub struct GetSearchResults {
712 #[serde(default)]
713 #[doc = "Unique search session identifier."]
714 pub search_id: String,
715 #[serde(default)]
716 #[doc = "Start index of the search result to be returned."]
717 pub from_index: JsUInt,
718 #[serde(default)]
719 #[doc = "End index of the search result to be returned."]
720 pub to_index: JsUInt,
721}
722#[allow(deprecated)]
723#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
724pub struct HideHighlight(pub Option<Json>);
725#[allow(deprecated)]
726#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
727pub struct HighlightNode(pub Option<Json>);
728#[allow(deprecated)]
729#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
730pub struct HighlightRect(pub Option<Json>);
731#[allow(deprecated)]
732#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
733pub struct MarkUndoableState(pub Option<Json>);
734#[allow(deprecated)]
735#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
736#[builder(setter(into, strip_option))]
737#[serde(rename_all = "camelCase")]
738#[doc = "Moves node into the new container, places it before the given anchor."]
739pub struct MoveTo {
740 #[doc = "Id of the node to move."]
741 pub node_id: NodeId,
742 #[doc = "Id of the element to drop the moved node into."]
743 pub target_node_id: NodeId,
744 #[builder(default)]
745 #[serde(skip_serializing_if = "Option::is_none")]
746 #[doc = "Drop node before this one (if absent, the moved node becomes the last child of\n `targetNodeId`)."]
747 pub insert_before_node_id: Option<NodeId>,
748}
749#[allow(deprecated)]
750#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
751#[builder(setter(into, strip_option))]
752#[serde(rename_all = "camelCase")]
753#[doc = "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n `cancelSearch` to end this search session."]
754pub struct PerformSearch {
755 #[serde(default)]
756 #[doc = "Plain text or query selector or XPath search query."]
757 pub query: String,
758 #[builder(default)]
759 #[serde(skip_serializing_if = "Option::is_none")]
760 #[serde(default)]
761 #[doc = "True to search in user agent shadow DOM."]
762 #[serde(rename = "includeUserAgentShadowDOM")]
763 pub include_user_agent_shadow_dom: Option<bool>,
764}
765#[allow(deprecated)]
766#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
767#[builder(setter(into, strip_option))]
768#[serde(rename_all = "camelCase")]
769#[doc = "Requests that the node is sent to the caller given its path. // FIXME, use XPath"]
770pub struct PushNodeByPathToFrontend {
771 #[serde(default)]
772 #[doc = "Path to node in the proprietary format."]
773 pub path: String,
774}
775#[allow(deprecated)]
776#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
777#[builder(setter(into, strip_option))]
778#[serde(rename_all = "camelCase")]
779#[doc = "Requests that a batch of nodes is sent to the caller given their backend node ids."]
780pub struct PushNodesByBackendIdsToFrontend {
781 #[doc = "The array of backend node ids."]
782 pub backend_node_ids: Vec<BackendNodeId>,
783}
784#[allow(deprecated)]
785#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
786#[builder(setter(into, strip_option))]
787#[serde(rename_all = "camelCase")]
788#[doc = "Executes `querySelector` on a given node."]
789pub struct QuerySelector {
790 #[doc = "Id of the node to query upon."]
791 pub node_id: NodeId,
792 #[serde(default)]
793 #[doc = "Selector string."]
794 pub selector: String,
795}
796#[allow(deprecated)]
797#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
798#[builder(setter(into, strip_option))]
799#[serde(rename_all = "camelCase")]
800#[doc = "Executes `querySelectorAll` on a given node."]
801pub struct QuerySelectorAll {
802 #[doc = "Id of the node to query upon."]
803 pub node_id: NodeId,
804 #[serde(default)]
805 #[doc = "Selector string."]
806 pub selector: String,
807}
808#[allow(deprecated)]
809#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
810pub struct GetTopLayerElements(pub Option<Json>);
811#[allow(deprecated)]
812#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
813#[builder(setter(into, strip_option))]
814#[serde(rename_all = "camelCase")]
815#[doc = "Returns the NodeId of the matched element according to certain relations."]
816pub struct GetElementByRelation {
817 #[doc = "Id of the node from which to query the relation."]
818 pub node_id: NodeId,
819 #[doc = "Type of relation to get."]
820 pub relation: GetElementByRelationRelationOption,
821}
822#[allow(deprecated)]
823#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
824pub struct Redo(pub Option<Json>);
825#[allow(deprecated)]
826#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
827#[builder(setter(into, strip_option))]
828#[serde(rename_all = "camelCase")]
829#[doc = "Removes attribute with given name from an element with given id."]
830pub struct RemoveAttribute {
831 #[doc = "Id of the element to remove attribute from."]
832 pub node_id: NodeId,
833 #[serde(default)]
834 #[doc = "Name of the attribute to remove."]
835 pub name: String,
836}
837#[allow(deprecated)]
838#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
839#[builder(setter(into, strip_option))]
840#[serde(rename_all = "camelCase")]
841#[doc = "Removes node with given id."]
842pub struct RemoveNode {
843 #[doc = "Id of the node to remove."]
844 pub node_id: NodeId,
845}
846#[allow(deprecated)]
847#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
848#[builder(setter(into, strip_option))]
849#[serde(rename_all = "camelCase")]
850#[doc = "Requests that children of the node with given id are returned to the caller in form of\n `setChildNodes` events where not only immediate children are retrieved, but all children down to\n the specified depth."]
851pub struct RequestChildNodes {
852 #[doc = "Id of the node to get children for."]
853 pub node_id: NodeId,
854 #[builder(default)]
855 #[serde(skip_serializing_if = "Option::is_none")]
856 #[serde(default)]
857 #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\n entire subtree or provide an integer larger than 0."]
858 pub depth: Option<JsUInt>,
859 #[builder(default)]
860 #[serde(skip_serializing_if = "Option::is_none")]
861 #[serde(default)]
862 #[doc = "Whether or not iframes and shadow roots should be traversed when returning the sub-tree\n (default is false)."]
863 pub pierce: Option<bool>,
864}
865#[allow(deprecated)]
866#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
867#[builder(setter(into, strip_option))]
868#[serde(rename_all = "camelCase")]
869#[doc = "Requests that the node is sent to the caller given the JavaScript node object reference. All\n nodes that form the path from the node to the root are also sent to the client as a series of\n `setChildNodes` notifications."]
870pub struct RequestNode {
871 #[doc = "JavaScript object id to convert into node."]
872 pub object_id: runtime::RemoteObjectId,
873}
874#[allow(deprecated)]
875#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
876#[builder(setter(into, strip_option))]
877#[serde(rename_all = "camelCase")]
878#[doc = "Resolves the JavaScript node object for a given NodeId or BackendNodeId."]
879pub struct ResolveNode {
880 #[builder(default)]
881 #[serde(skip_serializing_if = "Option::is_none")]
882 #[doc = "Id of the node to resolve."]
883 pub node_id: Option<NodeId>,
884 #[builder(default)]
885 #[serde(skip_serializing_if = "Option::is_none")]
886 #[doc = "Backend identifier of the node to resolve."]
887 pub backend_node_id: Option<dom::BackendNodeId>,
888 #[builder(default)]
889 #[serde(skip_serializing_if = "Option::is_none")]
890 #[serde(default)]
891 #[doc = "Symbolic group name that can be used to release multiple objects."]
892 pub object_group: Option<String>,
893 #[builder(default)]
894 #[serde(skip_serializing_if = "Option::is_none")]
895 #[doc = "Execution context in which to resolve the node."]
896 pub execution_context_id: Option<runtime::ExecutionContextId>,
897}
898#[allow(deprecated)]
899#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
900#[builder(setter(into, strip_option))]
901#[serde(rename_all = "camelCase")]
902#[doc = "Sets attribute for an element with given id."]
903pub struct SetAttributeValue {
904 #[doc = "Id of the element to set attribute for."]
905 pub node_id: NodeId,
906 #[serde(default)]
907 #[doc = "Attribute name."]
908 pub name: String,
909 #[serde(default)]
910 #[doc = "Attribute value."]
911 pub value: String,
912}
913#[allow(deprecated)]
914#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
915#[builder(setter(into, strip_option))]
916#[serde(rename_all = "camelCase")]
917#[doc = "Sets attributes on element with given id. This method is useful when user edits some existing\n attribute value and types in several attribute name/value pairs."]
918pub struct SetAttributesAsText {
919 #[doc = "Id of the element to set attributes for."]
920 pub node_id: NodeId,
921 #[serde(default)]
922 #[doc = "Text with a number of attributes. Will parse this text using HTML parser."]
923 pub text: String,
924 #[builder(default)]
925 #[serde(skip_serializing_if = "Option::is_none")]
926 #[serde(default)]
927 #[doc = "Attribute name to replace with new attributes derived from text in case text parsed\n successfully."]
928 pub name: Option<String>,
929}
930#[allow(deprecated)]
931#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
932#[builder(setter(into, strip_option))]
933#[serde(rename_all = "camelCase")]
934#[doc = "Sets files for the given file input element."]
935pub struct SetFileInputFiles {
936 #[serde(default)]
937 #[doc = "Array of file paths to set."]
938 pub files: Vec<String>,
939 #[builder(default)]
940 #[serde(skip_serializing_if = "Option::is_none")]
941 #[doc = "Identifier of the node."]
942 pub node_id: Option<NodeId>,
943 #[builder(default)]
944 #[serde(skip_serializing_if = "Option::is_none")]
945 #[doc = "Identifier of the backend node."]
946 pub backend_node_id: Option<BackendNodeId>,
947 #[builder(default)]
948 #[serde(skip_serializing_if = "Option::is_none")]
949 #[doc = "JavaScript object id of the node wrapper."]
950 pub object_id: Option<runtime::RemoteObjectId>,
951}
952#[allow(deprecated)]
953#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
954#[builder(setter(into, strip_option))]
955#[serde(rename_all = "camelCase")]
956#[doc = "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled."]
957pub struct SetNodeStackTracesEnabled {
958 #[serde(default)]
959 #[doc = "Enable or disable."]
960 pub enable: bool,
961}
962#[allow(deprecated)]
963#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
964#[builder(setter(into, strip_option))]
965#[serde(rename_all = "camelCase")]
966#[doc = "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation."]
967pub struct GetNodeStackTraces {
968 #[doc = "Id of the node to get stack traces for."]
969 pub node_id: NodeId,
970}
971#[allow(deprecated)]
972#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
973#[builder(setter(into, strip_option))]
974#[serde(rename_all = "camelCase")]
975#[doc = "Returns file information for the given\n File wrapper."]
976pub struct GetFileInfo {
977 #[doc = "JavaScript object id of the node wrapper."]
978 pub object_id: runtime::RemoteObjectId,
979}
980#[allow(deprecated)]
981#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
982pub struct GetDetachedDomNodes(pub Option<Json>);
983#[allow(deprecated)]
984#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
985#[builder(setter(into, strip_option))]
986#[serde(rename_all = "camelCase")]
987#[doc = "Enables console to refer to the node with given id via $x (see Command Line API for more details\n $x functions)."]
988pub struct SetInspectedNode {
989 #[doc = "DOM node id to be accessible by means of $x command line API."]
990 pub node_id: NodeId,
991}
992#[allow(deprecated)]
993#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
994#[builder(setter(into, strip_option))]
995#[serde(rename_all = "camelCase")]
996#[doc = "Sets node name for a node with given id."]
997pub struct SetNodeName {
998 #[doc = "Id of the node to set name for."]
999 pub node_id: NodeId,
1000 #[serde(default)]
1001 #[doc = "New node's name."]
1002 pub name: String,
1003}
1004#[allow(deprecated)]
1005#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1006#[builder(setter(into, strip_option))]
1007#[serde(rename_all = "camelCase")]
1008#[doc = "Sets node value for a node with given id."]
1009pub struct SetNodeValue {
1010 #[doc = "Id of the node to set value for."]
1011 pub node_id: NodeId,
1012 #[serde(default)]
1013 #[doc = "New node's value."]
1014 pub value: String,
1015}
1016#[allow(deprecated)]
1017#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1018#[builder(setter(into, strip_option))]
1019#[serde(rename_all = "camelCase")]
1020#[doc = "Sets node HTML markup, returns new node id."]
1021pub struct SetOuterHTML {
1022 #[doc = "Id of the node to set markup for."]
1023 pub node_id: NodeId,
1024 #[serde(default)]
1025 #[doc = "Outer HTML markup to set."]
1026 #[serde(rename = "outerHTML")]
1027 pub outer_html: String,
1028}
1029#[allow(deprecated)]
1030#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1031pub struct Undo(pub Option<Json>);
1032#[allow(deprecated)]
1033#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1034#[builder(setter(into, strip_option))]
1035#[serde(rename_all = "camelCase")]
1036#[doc = "Returns iframe node that owns iframe with the given domain."]
1037pub struct GetFrameOwner {
1038 pub frame_id: page::FrameId,
1039}
1040#[allow(deprecated)]
1041#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1042#[builder(setter(into, strip_option))]
1043#[serde(rename_all = "camelCase")]
1044#[doc = "Returns the query container of the given node based on container query\n conditions: containerName, physical and logical axes, and whether it queries\n scroll-state or anchored elements. If no axes are provided and\n queriesScrollState is false, the style container is returned, which is the\n direct parent or the closest element with a matching container-name."]
1045pub struct GetContainerForNode {
1046 pub node_id: NodeId,
1047 #[builder(default)]
1048 #[serde(skip_serializing_if = "Option::is_none")]
1049 #[serde(default)]
1050 pub container_name: Option<String>,
1051 #[builder(default)]
1052 #[serde(skip_serializing_if = "Option::is_none")]
1053 pub physical_axes: Option<PhysicalAxes>,
1054 #[builder(default)]
1055 #[serde(skip_serializing_if = "Option::is_none")]
1056 pub logical_axes: Option<LogicalAxes>,
1057 #[builder(default)]
1058 #[serde(skip_serializing_if = "Option::is_none")]
1059 #[serde(default)]
1060 pub queries_scroll_state: Option<bool>,
1061 #[builder(default)]
1062 #[serde(skip_serializing_if = "Option::is_none")]
1063 #[serde(default)]
1064 pub queries_anchored: Option<bool>,
1065}
1066#[allow(deprecated)]
1067#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1068#[builder(setter(into, strip_option))]
1069#[serde(rename_all = "camelCase")]
1070#[doc = "Returns the descendants of a container query container that have\n container queries against this container."]
1071pub struct GetQueryingDescendantsForContainer {
1072 #[doc = "Id of the container node to find querying descendants from."]
1073 pub node_id: NodeId,
1074}
1075#[allow(deprecated)]
1076#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1077#[builder(setter(into, strip_option))]
1078#[serde(rename_all = "camelCase")]
1079#[doc = "Returns the target anchor element of the given anchor query according to\n <https://www.w3.org/TR/css-anchor-position-1/#target>."]
1080pub struct GetAnchorElement {
1081 #[doc = "Id of the positioned element from which to find the anchor."]
1082 pub node_id: NodeId,
1083 #[builder(default)]
1084 #[serde(skip_serializing_if = "Option::is_none")]
1085 #[serde(default)]
1086 #[doc = "An optional anchor specifier, as defined in\n <https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier>.\n If not provided, it will return the implicit anchor element for\n the given positioned element."]
1087 pub anchor_specifier: Option<String>,
1088}
1089#[allow(deprecated)]
1090#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1091#[builder(setter(into, strip_option))]
1092#[serde(rename_all = "camelCase")]
1093#[doc = "When enabling, this API force-opens the popover identified by nodeId\n and keeps it open until disabled."]
1094pub struct ForceShowPopover {
1095 #[doc = "Id of the popover HTMLElement"]
1096 pub node_id: NodeId,
1097 #[serde(default)]
1098 #[doc = "If true, opens the popover and keeps it open. If false, closes the\n popover if it was previously force-opened."]
1099 pub enable: bool,
1100}
1101#[allow(deprecated)]
1102#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1103#[serde(rename_all = "camelCase")]
1104#[doc = "Collects class names for the node with given id and all of it's child nodes."]
1105pub struct CollectClassNamesFromSubtreeReturnObject {
1106 #[doc = "Class name list."]
1107 pub class_names: Vec<String>,
1108}
1109#[allow(deprecated)]
1110#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1111#[serde(rename_all = "camelCase")]
1112#[doc = "Creates a deep copy of the specified node and places it into the target container before the\n given anchor."]
1113pub struct CopyToReturnObject {
1114 #[doc = "Id of the node clone."]
1115 pub node_id: NodeId,
1116}
1117#[allow(deprecated)]
1118#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1119#[serde(rename_all = "camelCase")]
1120#[doc = "Describes node given its id, does not require domain to be enabled. Does not start tracking any\n objects, can be used for automation."]
1121pub struct DescribeNodeReturnObject {
1122 #[doc = "Node description."]
1123 pub node: Node,
1124}
1125#[allow(deprecated)]
1126#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1127#[doc = "Scrolls the specified rect of the given node into view if not already visible.\n Note: exactly one between nodeId, backendNodeId and objectId should be passed\n to identify the node."]
1128pub struct ScrollIntoViewIfNeededReturnObject(pub Option<Json>);
1129#[allow(deprecated)]
1130#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1131#[doc = "Disables DOM agent for the given page."]
1132pub struct DisableReturnObject(pub Option<Json>);
1133#[allow(deprecated)]
1134#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1135#[doc = "Discards search results from the session with the given id. `getSearchResults` should no longer\n be called for that search."]
1136pub struct DiscardSearchResultsReturnObject(pub Option<Json>);
1137#[allow(deprecated)]
1138#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1139#[doc = "Enables DOM agent for the given page."]
1140pub struct EnableReturnObject(pub Option<Json>);
1141#[allow(deprecated)]
1142#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1143#[doc = "Focuses the given element."]
1144pub struct FocusReturnObject(pub Option<Json>);
1145#[allow(deprecated)]
1146#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1147#[serde(rename_all = "camelCase")]
1148#[doc = "Returns attributes for the specified node."]
1149pub struct GetAttributesReturnObject {
1150 #[doc = "An interleaved array of node attribute names and values."]
1151 pub attributes: Vec<String>,
1152}
1153#[allow(deprecated)]
1154#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1155#[serde(rename_all = "camelCase")]
1156#[doc = "Returns boxes for the given node."]
1157pub struct GetBoxModelReturnObject {
1158 #[doc = "Box model for the node."]
1159 pub model: BoxModel,
1160}
1161#[allow(deprecated)]
1162#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1163#[serde(rename_all = "camelCase")]
1164#[doc = "Returns quads that describe node position on the page. This method\n might return multiple quads for inline nodes."]
1165pub struct GetContentQuadsReturnObject {
1166 #[doc = "Quads that describe node layout relative to viewport."]
1167 pub quads: Vec<Quad>,
1168}
1169#[allow(deprecated)]
1170#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1171#[serde(rename_all = "camelCase")]
1172#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\n Implicitly enables the DOM domain events for the current target."]
1173pub struct GetDocumentReturnObject {
1174 #[doc = "Resulting node."]
1175 pub root: Node,
1176}
1177#[allow(deprecated)]
1178#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1179#[serde(rename_all = "camelCase")]
1180#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\n Deprecated, as it is not designed to work well with the rest of the DOM agent.\n Use DOMSnapshot.captureSnapshot instead."]
1181#[deprecated]
1182pub struct GetFlattenedDocumentReturnObject {
1183 #[doc = "Resulting node."]
1184 pub nodes: Vec<Node>,
1185}
1186#[allow(deprecated)]
1187#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1188#[serde(rename_all = "camelCase")]
1189#[doc = "Finds nodes with a given computed style in a subtree."]
1190pub struct GetNodesForSubtreeByStyleReturnObject {
1191 #[doc = "Resulting nodes."]
1192 pub node_ids: Vec<NodeId>,
1193}
1194#[allow(deprecated)]
1195#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1196#[serde(rename_all = "camelCase")]
1197#[doc = "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\n either returned or not."]
1198pub struct GetNodeForLocationReturnObject {
1199 #[doc = "Resulting node."]
1200 pub backend_node_id: BackendNodeId,
1201 #[doc = "Frame this node belongs to."]
1202 pub frame_id: page::FrameId,
1203 #[builder(default)]
1204 #[serde(skip_serializing_if = "Option::is_none")]
1205 #[doc = "Id of the node at given coordinates, only when enabled and requested document."]
1206 pub node_id: Option<NodeId>,
1207}
1208#[allow(deprecated)]
1209#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1210#[serde(rename_all = "camelCase")]
1211#[doc = "Returns node's HTML markup."]
1212pub struct GetOuterHTMLReturnObject {
1213 #[serde(default)]
1214 #[doc = "Outer HTML markup."]
1215 #[serde(rename = "outerHTML")]
1216 pub outer_html: String,
1217}
1218#[allow(deprecated)]
1219#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1220#[serde(rename_all = "camelCase")]
1221#[doc = "Returns the id of the nearest ancestor that is a relayout boundary."]
1222pub struct GetRelayoutBoundaryReturnObject {
1223 #[doc = "Relayout boundary node id for the given node."]
1224 pub node_id: NodeId,
1225}
1226#[allow(deprecated)]
1227#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1228#[serde(rename_all = "camelCase")]
1229#[doc = "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\n identifier."]
1230pub struct GetSearchResultsReturnObject {
1231 #[doc = "Ids of the search result nodes."]
1232 pub node_ids: Vec<NodeId>,
1233}
1234#[allow(deprecated)]
1235#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1236#[doc = "Hides any highlight."]
1237pub struct HideHighlightReturnObject(pub Option<Json>);
1238#[allow(deprecated)]
1239#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1240#[doc = "Highlights DOM node."]
1241pub struct HighlightNodeReturnObject(pub Option<Json>);
1242#[allow(deprecated)]
1243#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1244#[doc = "Highlights given rectangle."]
1245pub struct HighlightRectReturnObject(pub Option<Json>);
1246#[allow(deprecated)]
1247#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1248#[doc = "Marks last undoable state."]
1249pub struct MarkUndoableStateReturnObject(pub Option<Json>);
1250#[allow(deprecated)]
1251#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1252#[serde(rename_all = "camelCase")]
1253#[doc = "Moves node into the new container, places it before the given anchor."]
1254pub struct MoveToReturnObject {
1255 #[doc = "New id of the moved node."]
1256 pub node_id: NodeId,
1257}
1258#[allow(deprecated)]
1259#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1260#[serde(rename_all = "camelCase")]
1261#[doc = "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n `cancelSearch` to end this search session."]
1262pub struct PerformSearchReturnObject {
1263 #[serde(default)]
1264 #[doc = "Unique search session identifier."]
1265 pub search_id: String,
1266 #[serde(default)]
1267 #[doc = "Number of search results."]
1268 pub result_count: JsUInt,
1269}
1270#[allow(deprecated)]
1271#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1272#[serde(rename_all = "camelCase")]
1273#[doc = "Requests that the node is sent to the caller given its path. // FIXME, use XPath"]
1274pub struct PushNodeByPathToFrontendReturnObject {
1275 #[doc = "Id of the node for given path."]
1276 pub node_id: NodeId,
1277}
1278#[allow(deprecated)]
1279#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1280#[serde(rename_all = "camelCase")]
1281#[doc = "Requests that a batch of nodes is sent to the caller given their backend node ids."]
1282pub struct PushNodesByBackendIdsToFrontendReturnObject {
1283 #[doc = "The array of ids of pushed nodes that correspond to the backend ids specified in\n backendNodeIds."]
1284 pub node_ids: Vec<NodeId>,
1285}
1286#[allow(deprecated)]
1287#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1288#[serde(rename_all = "camelCase")]
1289#[doc = "Executes `querySelector` on a given node."]
1290pub struct QuerySelectorReturnObject {
1291 #[doc = "Query selector result."]
1292 pub node_id: NodeId,
1293}
1294#[allow(deprecated)]
1295#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1296#[serde(rename_all = "camelCase")]
1297#[doc = "Executes `querySelectorAll` on a given node."]
1298pub struct QuerySelectorAllReturnObject {
1299 #[doc = "Query selector result."]
1300 pub node_ids: Vec<NodeId>,
1301}
1302#[allow(deprecated)]
1303#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1304#[serde(rename_all = "camelCase")]
1305#[doc = "Returns NodeIds of current top layer elements.\n Top layer is rendered closest to the user within a viewport, therefore its elements always\n appear on top of all other content."]
1306pub struct GetTopLayerElementsReturnObject {
1307 #[doc = "NodeIds of top layer elements"]
1308 pub node_ids: Vec<NodeId>,
1309}
1310#[allow(deprecated)]
1311#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1312#[serde(rename_all = "camelCase")]
1313#[doc = "Returns the NodeId of the matched element according to certain relations."]
1314pub struct GetElementByRelationReturnObject {
1315 #[doc = "NodeId of the element matching the queried relation."]
1316 pub node_id: NodeId,
1317}
1318#[allow(deprecated)]
1319#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1320#[doc = "Re-does the last undone action."]
1321pub struct RedoReturnObject(pub Option<Json>);
1322#[allow(deprecated)]
1323#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1324#[doc = "Removes attribute with given name from an element with given id."]
1325pub struct RemoveAttributeReturnObject(pub Option<Json>);
1326#[allow(deprecated)]
1327#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1328#[doc = "Removes node with given id."]
1329pub struct RemoveNodeReturnObject(pub Option<Json>);
1330#[allow(deprecated)]
1331#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1332#[doc = "Requests that children of the node with given id are returned to the caller in form of\n `setChildNodes` events where not only immediate children are retrieved, but all children down to\n the specified depth."]
1333pub struct RequestChildNodesReturnObject(pub Option<Json>);
1334#[allow(deprecated)]
1335#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1336#[serde(rename_all = "camelCase")]
1337#[doc = "Requests that the node is sent to the caller given the JavaScript node object reference. All\n nodes that form the path from the node to the root are also sent to the client as a series of\n `setChildNodes` notifications."]
1338pub struct RequestNodeReturnObject {
1339 #[doc = "Node id for given object."]
1340 pub node_id: NodeId,
1341}
1342#[allow(deprecated)]
1343#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1344#[serde(rename_all = "camelCase")]
1345#[doc = "Resolves the JavaScript node object for a given NodeId or BackendNodeId."]
1346pub struct ResolveNodeReturnObject {
1347 #[doc = "JavaScript object wrapper for given node."]
1348 pub object: runtime::RemoteObject,
1349}
1350#[allow(deprecated)]
1351#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1352#[doc = "Sets attribute for an element with given id."]
1353pub struct SetAttributeValueReturnObject(pub Option<Json>);
1354#[allow(deprecated)]
1355#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1356#[doc = "Sets attributes on element with given id. This method is useful when user edits some existing\n attribute value and types in several attribute name/value pairs."]
1357pub struct SetAttributesAsTextReturnObject(pub Option<Json>);
1358#[allow(deprecated)]
1359#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1360#[doc = "Sets files for the given file input element."]
1361pub struct SetFileInputFilesReturnObject(pub Option<Json>);
1362#[allow(deprecated)]
1363#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1364#[doc = "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled."]
1365pub struct SetNodeStackTracesEnabledReturnObject(pub Option<Json>);
1366#[allow(deprecated)]
1367#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1368#[serde(rename_all = "camelCase")]
1369#[doc = "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation."]
1370pub struct GetNodeStackTracesReturnObject {
1371 #[builder(default)]
1372 #[serde(skip_serializing_if = "Option::is_none")]
1373 #[doc = "Creation stack trace, if available."]
1374 pub creation: Option<runtime::StackTrace>,
1375}
1376#[allow(deprecated)]
1377#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1378#[serde(rename_all = "camelCase")]
1379#[doc = "Returns file information for the given\n File wrapper."]
1380pub struct GetFileInfoReturnObject {
1381 #[serde(default)]
1382 pub path: String,
1383}
1384#[allow(deprecated)]
1385#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1386#[serde(rename_all = "camelCase")]
1387#[doc = "Returns list of detached nodes"]
1388pub struct GetDetachedDomNodesReturnObject {
1389 #[doc = "The list of detached nodes"]
1390 pub detached_nodes: Vec<DetachedElementInfo>,
1391}
1392#[allow(deprecated)]
1393#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1394#[doc = "Enables console to refer to the node with given id via $x (see Command Line API for more details\n $x functions)."]
1395pub struct SetInspectedNodeReturnObject(pub Option<Json>);
1396#[allow(deprecated)]
1397#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1398#[serde(rename_all = "camelCase")]
1399#[doc = "Sets node name for a node with given id."]
1400pub struct SetNodeNameReturnObject {
1401 #[doc = "New node's id."]
1402 pub node_id: NodeId,
1403}
1404#[allow(deprecated)]
1405#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1406#[doc = "Sets node value for a node with given id."]
1407pub struct SetNodeValueReturnObject(pub Option<Json>);
1408#[allow(deprecated)]
1409#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1410#[doc = "Sets node HTML markup, returns new node id."]
1411pub struct SetOuterHTMLReturnObject(pub Option<Json>);
1412#[allow(deprecated)]
1413#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1414#[doc = "Undoes the last performed action."]
1415pub struct UndoReturnObject(pub Option<Json>);
1416#[allow(deprecated)]
1417#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1418#[serde(rename_all = "camelCase")]
1419#[doc = "Returns iframe node that owns iframe with the given domain."]
1420pub struct GetFrameOwnerReturnObject {
1421 #[doc = "Resulting node."]
1422 pub backend_node_id: BackendNodeId,
1423 #[builder(default)]
1424 #[serde(skip_serializing_if = "Option::is_none")]
1425 #[doc = "Id of the node at given coordinates, only when enabled and requested document."]
1426 pub node_id: Option<NodeId>,
1427}
1428#[allow(deprecated)]
1429#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1430#[serde(rename_all = "camelCase")]
1431#[doc = "Returns the query container of the given node based on container query\n conditions: containerName, physical and logical axes, and whether it queries\n scroll-state or anchored elements. If no axes are provided and\n queriesScrollState is false, the style container is returned, which is the\n direct parent or the closest element with a matching container-name."]
1432pub struct GetContainerForNodeReturnObject {
1433 #[builder(default)]
1434 #[serde(skip_serializing_if = "Option::is_none")]
1435 #[doc = "The container node for the given node, or null if not found."]
1436 pub node_id: Option<NodeId>,
1437}
1438#[allow(deprecated)]
1439#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1440#[serde(rename_all = "camelCase")]
1441#[doc = "Returns the descendants of a container query container that have\n container queries against this container."]
1442pub struct GetQueryingDescendantsForContainerReturnObject {
1443 #[doc = "Descendant nodes with container queries against the given container."]
1444 pub node_ids: Vec<NodeId>,
1445}
1446#[allow(deprecated)]
1447#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1448#[serde(rename_all = "camelCase")]
1449#[doc = "Returns the target anchor element of the given anchor query according to\n <https://www.w3.org/TR/css-anchor-position-1/#target>."]
1450pub struct GetAnchorElementReturnObject {
1451 #[doc = "The anchor element of the given anchor query."]
1452 pub node_id: NodeId,
1453}
1454#[allow(deprecated)]
1455#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1456#[serde(rename_all = "camelCase")]
1457#[doc = "When enabling, this API force-opens the popover identified by nodeId\n and keeps it open until disabled."]
1458pub struct ForceShowPopoverReturnObject {
1459 #[doc = "List of popovers that were closed in order to respect popover stacking order."]
1460 pub node_ids: Vec<NodeId>,
1461}
1462#[allow(deprecated)]
1463impl Method for CollectClassNamesFromSubtree {
1464 const NAME: &'static str = "DOM.collectClassNamesFromSubtree";
1465 type ReturnObject = CollectClassNamesFromSubtreeReturnObject;
1466}
1467#[allow(deprecated)]
1468impl Method for CopyTo {
1469 const NAME: &'static str = "DOM.copyTo";
1470 type ReturnObject = CopyToReturnObject;
1471}
1472#[allow(deprecated)]
1473impl Method for DescribeNode {
1474 const NAME: &'static str = "DOM.describeNode";
1475 type ReturnObject = DescribeNodeReturnObject;
1476}
1477#[allow(deprecated)]
1478impl Method for ScrollIntoViewIfNeeded {
1479 const NAME: &'static str = "DOM.scrollIntoViewIfNeeded";
1480 type ReturnObject = ScrollIntoViewIfNeededReturnObject;
1481}
1482#[allow(deprecated)]
1483impl Method for Disable {
1484 const NAME: &'static str = "DOM.disable";
1485 type ReturnObject = DisableReturnObject;
1486}
1487#[allow(deprecated)]
1488impl Method for DiscardSearchResults {
1489 const NAME: &'static str = "DOM.discardSearchResults";
1490 type ReturnObject = DiscardSearchResultsReturnObject;
1491}
1492#[allow(deprecated)]
1493impl Method for Enable {
1494 const NAME: &'static str = "DOM.enable";
1495 type ReturnObject = EnableReturnObject;
1496}
1497#[allow(deprecated)]
1498impl Method for Focus {
1499 const NAME: &'static str = "DOM.focus";
1500 type ReturnObject = FocusReturnObject;
1501}
1502#[allow(deprecated)]
1503impl Method for GetAttributes {
1504 const NAME: &'static str = "DOM.getAttributes";
1505 type ReturnObject = GetAttributesReturnObject;
1506}
1507#[allow(deprecated)]
1508impl Method for GetBoxModel {
1509 const NAME: &'static str = "DOM.getBoxModel";
1510 type ReturnObject = GetBoxModelReturnObject;
1511}
1512#[allow(deprecated)]
1513impl Method for GetContentQuads {
1514 const NAME: &'static str = "DOM.getContentQuads";
1515 type ReturnObject = GetContentQuadsReturnObject;
1516}
1517#[allow(deprecated)]
1518impl Method for GetDocument {
1519 const NAME: &'static str = "DOM.getDocument";
1520 type ReturnObject = GetDocumentReturnObject;
1521}
1522#[allow(deprecated)]
1523impl Method for GetFlattenedDocument {
1524 const NAME: &'static str = "DOM.getFlattenedDocument";
1525 type ReturnObject = GetFlattenedDocumentReturnObject;
1526}
1527#[allow(deprecated)]
1528impl Method for GetNodesForSubtreeByStyle {
1529 const NAME: &'static str = "DOM.getNodesForSubtreeByStyle";
1530 type ReturnObject = GetNodesForSubtreeByStyleReturnObject;
1531}
1532#[allow(deprecated)]
1533impl Method for GetNodeForLocation {
1534 const NAME: &'static str = "DOM.getNodeForLocation";
1535 type ReturnObject = GetNodeForLocationReturnObject;
1536}
1537#[allow(deprecated)]
1538impl Method for GetOuterHTML {
1539 const NAME: &'static str = "DOM.getOuterHTML";
1540 type ReturnObject = GetOuterHTMLReturnObject;
1541}
1542#[allow(deprecated)]
1543impl Method for GetRelayoutBoundary {
1544 const NAME: &'static str = "DOM.getRelayoutBoundary";
1545 type ReturnObject = GetRelayoutBoundaryReturnObject;
1546}
1547#[allow(deprecated)]
1548impl Method for GetSearchResults {
1549 const NAME: &'static str = "DOM.getSearchResults";
1550 type ReturnObject = GetSearchResultsReturnObject;
1551}
1552#[allow(deprecated)]
1553impl Method for HideHighlight {
1554 const NAME: &'static str = "DOM.hideHighlight";
1555 type ReturnObject = HideHighlightReturnObject;
1556}
1557#[allow(deprecated)]
1558impl Method for HighlightNode {
1559 const NAME: &'static str = "DOM.highlightNode";
1560 type ReturnObject = HighlightNodeReturnObject;
1561}
1562#[allow(deprecated)]
1563impl Method for HighlightRect {
1564 const NAME: &'static str = "DOM.highlightRect";
1565 type ReturnObject = HighlightRectReturnObject;
1566}
1567#[allow(deprecated)]
1568impl Method for MarkUndoableState {
1569 const NAME: &'static str = "DOM.markUndoableState";
1570 type ReturnObject = MarkUndoableStateReturnObject;
1571}
1572#[allow(deprecated)]
1573impl Method for MoveTo {
1574 const NAME: &'static str = "DOM.moveTo";
1575 type ReturnObject = MoveToReturnObject;
1576}
1577#[allow(deprecated)]
1578impl Method for PerformSearch {
1579 const NAME: &'static str = "DOM.performSearch";
1580 type ReturnObject = PerformSearchReturnObject;
1581}
1582#[allow(deprecated)]
1583impl Method for PushNodeByPathToFrontend {
1584 const NAME: &'static str = "DOM.pushNodeByPathToFrontend";
1585 type ReturnObject = PushNodeByPathToFrontendReturnObject;
1586}
1587#[allow(deprecated)]
1588impl Method for PushNodesByBackendIdsToFrontend {
1589 const NAME: &'static str = "DOM.pushNodesByBackendIdsToFrontend";
1590 type ReturnObject = PushNodesByBackendIdsToFrontendReturnObject;
1591}
1592#[allow(deprecated)]
1593impl Method for QuerySelector {
1594 const NAME: &'static str = "DOM.querySelector";
1595 type ReturnObject = QuerySelectorReturnObject;
1596}
1597#[allow(deprecated)]
1598impl Method for QuerySelectorAll {
1599 const NAME: &'static str = "DOM.querySelectorAll";
1600 type ReturnObject = QuerySelectorAllReturnObject;
1601}
1602#[allow(deprecated)]
1603impl Method for GetTopLayerElements {
1604 const NAME: &'static str = "DOM.getTopLayerElements";
1605 type ReturnObject = GetTopLayerElementsReturnObject;
1606}
1607#[allow(deprecated)]
1608impl Method for GetElementByRelation {
1609 const NAME: &'static str = "DOM.getElementByRelation";
1610 type ReturnObject = GetElementByRelationReturnObject;
1611}
1612#[allow(deprecated)]
1613impl Method for Redo {
1614 const NAME: &'static str = "DOM.redo";
1615 type ReturnObject = RedoReturnObject;
1616}
1617#[allow(deprecated)]
1618impl Method for RemoveAttribute {
1619 const NAME: &'static str = "DOM.removeAttribute";
1620 type ReturnObject = RemoveAttributeReturnObject;
1621}
1622#[allow(deprecated)]
1623impl Method for RemoveNode {
1624 const NAME: &'static str = "DOM.removeNode";
1625 type ReturnObject = RemoveNodeReturnObject;
1626}
1627#[allow(deprecated)]
1628impl Method for RequestChildNodes {
1629 const NAME: &'static str = "DOM.requestChildNodes";
1630 type ReturnObject = RequestChildNodesReturnObject;
1631}
1632#[allow(deprecated)]
1633impl Method for RequestNode {
1634 const NAME: &'static str = "DOM.requestNode";
1635 type ReturnObject = RequestNodeReturnObject;
1636}
1637#[allow(deprecated)]
1638impl Method for ResolveNode {
1639 const NAME: &'static str = "DOM.resolveNode";
1640 type ReturnObject = ResolveNodeReturnObject;
1641}
1642#[allow(deprecated)]
1643impl Method for SetAttributeValue {
1644 const NAME: &'static str = "DOM.setAttributeValue";
1645 type ReturnObject = SetAttributeValueReturnObject;
1646}
1647#[allow(deprecated)]
1648impl Method for SetAttributesAsText {
1649 const NAME: &'static str = "DOM.setAttributesAsText";
1650 type ReturnObject = SetAttributesAsTextReturnObject;
1651}
1652#[allow(deprecated)]
1653impl Method for SetFileInputFiles {
1654 const NAME: &'static str = "DOM.setFileInputFiles";
1655 type ReturnObject = SetFileInputFilesReturnObject;
1656}
1657#[allow(deprecated)]
1658impl Method for SetNodeStackTracesEnabled {
1659 const NAME: &'static str = "DOM.setNodeStackTracesEnabled";
1660 type ReturnObject = SetNodeStackTracesEnabledReturnObject;
1661}
1662#[allow(deprecated)]
1663impl Method for GetNodeStackTraces {
1664 const NAME: &'static str = "DOM.getNodeStackTraces";
1665 type ReturnObject = GetNodeStackTracesReturnObject;
1666}
1667#[allow(deprecated)]
1668impl Method for GetFileInfo {
1669 const NAME: &'static str = "DOM.getFileInfo";
1670 type ReturnObject = GetFileInfoReturnObject;
1671}
1672#[allow(deprecated)]
1673impl Method for GetDetachedDomNodes {
1674 const NAME: &'static str = "DOM.getDetachedDomNodes";
1675 type ReturnObject = GetDetachedDomNodesReturnObject;
1676}
1677#[allow(deprecated)]
1678impl Method for SetInspectedNode {
1679 const NAME: &'static str = "DOM.setInspectedNode";
1680 type ReturnObject = SetInspectedNodeReturnObject;
1681}
1682#[allow(deprecated)]
1683impl Method for SetNodeName {
1684 const NAME: &'static str = "DOM.setNodeName";
1685 type ReturnObject = SetNodeNameReturnObject;
1686}
1687#[allow(deprecated)]
1688impl Method for SetNodeValue {
1689 const NAME: &'static str = "DOM.setNodeValue";
1690 type ReturnObject = SetNodeValueReturnObject;
1691}
1692#[allow(deprecated)]
1693impl Method for SetOuterHTML {
1694 const NAME: &'static str = "DOM.setOuterHTML";
1695 type ReturnObject = SetOuterHTMLReturnObject;
1696}
1697#[allow(deprecated)]
1698impl Method for Undo {
1699 const NAME: &'static str = "DOM.undo";
1700 type ReturnObject = UndoReturnObject;
1701}
1702#[allow(deprecated)]
1703impl Method for GetFrameOwner {
1704 const NAME: &'static str = "DOM.getFrameOwner";
1705 type ReturnObject = GetFrameOwnerReturnObject;
1706}
1707#[allow(deprecated)]
1708impl Method for GetContainerForNode {
1709 const NAME: &'static str = "DOM.getContainerForNode";
1710 type ReturnObject = GetContainerForNodeReturnObject;
1711}
1712#[allow(deprecated)]
1713impl Method for GetQueryingDescendantsForContainer {
1714 const NAME: &'static str = "DOM.getQueryingDescendantsForContainer";
1715 type ReturnObject = GetQueryingDescendantsForContainerReturnObject;
1716}
1717#[allow(deprecated)]
1718impl Method for GetAnchorElement {
1719 const NAME: &'static str = "DOM.getAnchorElement";
1720 type ReturnObject = GetAnchorElementReturnObject;
1721}
1722#[allow(deprecated)]
1723impl Method for ForceShowPopover {
1724 const NAME: &'static str = "DOM.forceShowPopover";
1725 type ReturnObject = ForceShowPopoverReturnObject;
1726}
1727#[allow(dead_code)]
1728pub mod events {
1729 #[allow(unused_imports)]
1730 use super::super::types::*;
1731 #[allow(unused_imports)]
1732 use derive_builder::Builder;
1733 #[allow(unused_imports)]
1734 use serde::{Deserialize, Serialize};
1735 #[allow(unused_imports)]
1736 use serde_json::Value as Json;
1737 #[allow(deprecated)]
1738 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1739 pub struct AttributeModifiedEvent {
1740 pub params: AttributeModifiedEventParams,
1741 }
1742 #[allow(deprecated)]
1743 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1744 #[serde(rename_all = "camelCase")]
1745 pub struct AttributeModifiedEventParams {
1746 #[doc = "Id of the node that has changed."]
1747 pub node_id: super::NodeId,
1748 #[serde(default)]
1749 #[doc = "Attribute name."]
1750 pub name: String,
1751 #[serde(default)]
1752 #[doc = "Attribute value."]
1753 pub value: String,
1754 }
1755 #[allow(deprecated)]
1756 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1757 pub struct AdoptedStyleSheetsModifiedEvent {
1758 pub params: AdoptedStyleSheetsModifiedEventParams,
1759 }
1760 #[allow(deprecated)]
1761 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1762 #[serde(rename_all = "camelCase")]
1763 pub struct AdoptedStyleSheetsModifiedEventParams {
1764 #[doc = "Id of the node that has changed."]
1765 pub node_id: super::NodeId,
1766 #[doc = "New adoptedStyleSheets array."]
1767 pub adopted_style_sheets: Vec<super::StyleSheetId>,
1768 }
1769 #[allow(deprecated)]
1770 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1771 pub struct AttributeRemovedEvent {
1772 pub params: AttributeRemovedEventParams,
1773 }
1774 #[allow(deprecated)]
1775 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1776 #[serde(rename_all = "camelCase")]
1777 pub struct AttributeRemovedEventParams {
1778 #[doc = "Id of the node that has changed."]
1779 pub node_id: super::NodeId,
1780 #[serde(default)]
1781 #[doc = "A ttribute name."]
1782 pub name: String,
1783 }
1784 #[allow(deprecated)]
1785 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1786 pub struct CharacterDataModifiedEvent {
1787 pub params: CharacterDataModifiedEventParams,
1788 }
1789 #[allow(deprecated)]
1790 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1791 #[serde(rename_all = "camelCase")]
1792 pub struct CharacterDataModifiedEventParams {
1793 #[doc = "Id of the node that has changed."]
1794 pub node_id: super::NodeId,
1795 #[serde(default)]
1796 #[doc = "New text value."]
1797 pub character_data: String,
1798 }
1799 #[allow(deprecated)]
1800 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1801 pub struct ChildNodeCountUpdatedEvent {
1802 pub params: ChildNodeCountUpdatedEventParams,
1803 }
1804 #[allow(deprecated)]
1805 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1806 #[serde(rename_all = "camelCase")]
1807 pub struct ChildNodeCountUpdatedEventParams {
1808 #[doc = "Id of the node that has changed."]
1809 pub node_id: super::NodeId,
1810 #[serde(default)]
1811 #[doc = "New node count."]
1812 pub child_node_count: JsUInt,
1813 }
1814 #[allow(deprecated)]
1815 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1816 pub struct ChildNodeInsertedEvent {
1817 pub params: ChildNodeInsertedEventParams,
1818 }
1819 #[allow(deprecated)]
1820 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1821 #[serde(rename_all = "camelCase")]
1822 pub struct ChildNodeInsertedEventParams {
1823 #[doc = "Id of the node that has changed."]
1824 pub parent_node_id: super::NodeId,
1825 #[doc = "Id of the previous sibling."]
1826 pub previous_node_id: super::NodeId,
1827 #[doc = "Inserted node data."]
1828 pub node: super::Node,
1829 }
1830 #[allow(deprecated)]
1831 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1832 pub struct ChildNodeRemovedEvent {
1833 pub params: ChildNodeRemovedEventParams,
1834 }
1835 #[allow(deprecated)]
1836 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1837 #[serde(rename_all = "camelCase")]
1838 pub struct ChildNodeRemovedEventParams {
1839 #[doc = "Parent id."]
1840 pub parent_node_id: super::NodeId,
1841 #[doc = "Id of the node that has been removed."]
1842 pub node_id: super::NodeId,
1843 }
1844 #[allow(deprecated)]
1845 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1846 pub struct DistributedNodesUpdatedEvent {
1847 pub params: DistributedNodesUpdatedEventParams,
1848 }
1849 #[allow(deprecated)]
1850 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1851 #[serde(rename_all = "camelCase")]
1852 pub struct DistributedNodesUpdatedEventParams {
1853 #[doc = "Insertion point where distributed nodes were updated."]
1854 pub insertion_point_id: super::NodeId,
1855 #[doc = "Distributed nodes for given insertion point."]
1856 pub distributed_nodes: Vec<super::BackendNode>,
1857 }
1858 #[allow(deprecated)]
1859 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1860 pub struct DocumentUpdatedEvent(pub Option<Json>);
1861 #[allow(deprecated)]
1862 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1863 pub struct InlineStyleInvalidatedEvent {
1864 pub params: InlineStyleInvalidatedEventParams,
1865 }
1866 #[allow(deprecated)]
1867 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1868 #[serde(rename_all = "camelCase")]
1869 pub struct InlineStyleInvalidatedEventParams {
1870 #[doc = "Ids of the nodes for which the inline styles have been invalidated."]
1871 pub node_ids: Vec<super::NodeId>,
1872 }
1873 #[allow(deprecated)]
1874 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1875 pub struct PseudoElementAddedEvent {
1876 pub params: PseudoElementAddedEventParams,
1877 }
1878 #[allow(deprecated)]
1879 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1880 #[serde(rename_all = "camelCase")]
1881 pub struct PseudoElementAddedEventParams {
1882 #[doc = "Pseudo element's parent element id."]
1883 pub parent_id: super::NodeId,
1884 #[doc = "The added pseudo element."]
1885 pub pseudo_element: super::Node,
1886 }
1887 #[allow(deprecated)]
1888 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1889 pub struct TopLayerElementsUpdatedEvent(pub Option<Json>);
1890 #[allow(deprecated)]
1891 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1892 pub struct ScrollableFlagUpdatedEvent {
1893 pub params: ScrollableFlagUpdatedEventParams,
1894 }
1895 #[allow(deprecated)]
1896 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1897 #[serde(rename_all = "camelCase")]
1898 pub struct ScrollableFlagUpdatedEventParams {
1899 #[doc = "The id of the node."]
1900 pub node_id: super::super::dom::NodeId,
1901 #[serde(default)]
1902 #[doc = "If the node is scrollable."]
1903 pub is_scrollable: bool,
1904 }
1905 #[allow(deprecated)]
1906 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1907 pub struct AffectedByStartingStylesFlagUpdatedEvent {
1908 pub params: AffectedByStartingStylesFlagUpdatedEventParams,
1909 }
1910 #[allow(deprecated)]
1911 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1912 #[serde(rename_all = "camelCase")]
1913 pub struct AffectedByStartingStylesFlagUpdatedEventParams {
1914 #[doc = "The id of the node."]
1915 pub node_id: super::super::dom::NodeId,
1916 #[serde(default)]
1917 #[doc = "If the node has starting styles."]
1918 pub affected_by_starting_styles: bool,
1919 }
1920 #[allow(deprecated)]
1921 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1922 pub struct PseudoElementRemovedEvent {
1923 pub params: PseudoElementRemovedEventParams,
1924 }
1925 #[allow(deprecated)]
1926 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1927 #[serde(rename_all = "camelCase")]
1928 pub struct PseudoElementRemovedEventParams {
1929 #[doc = "Pseudo element's parent element id."]
1930 pub parent_id: super::NodeId,
1931 #[doc = "The removed pseudo element id."]
1932 pub pseudo_element_id: super::NodeId,
1933 }
1934 #[allow(deprecated)]
1935 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1936 pub struct SetChildNodesEvent {
1937 pub params: SetChildNodesEventParams,
1938 }
1939 #[allow(deprecated)]
1940 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1941 #[serde(rename_all = "camelCase")]
1942 pub struct SetChildNodesEventParams {
1943 #[doc = "Parent node id to populate with children."]
1944 pub parent_id: super::NodeId,
1945 #[doc = "Child nodes array."]
1946 pub nodes: Vec<super::Node>,
1947 }
1948 #[allow(deprecated)]
1949 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1950 pub struct ShadowRootPoppedEvent {
1951 pub params: ShadowRootPoppedEventParams,
1952 }
1953 #[allow(deprecated)]
1954 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1955 #[serde(rename_all = "camelCase")]
1956 pub struct ShadowRootPoppedEventParams {
1957 #[doc = "Host element id."]
1958 pub host_id: super::NodeId,
1959 #[doc = "Shadow root id."]
1960 pub root_id: super::NodeId,
1961 }
1962 #[allow(deprecated)]
1963 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1964 pub struct ShadowRootPushedEvent {
1965 pub params: ShadowRootPushedEventParams,
1966 }
1967 #[allow(deprecated)]
1968 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1969 #[serde(rename_all = "camelCase")]
1970 pub struct ShadowRootPushedEventParams {
1971 #[doc = "Host element id."]
1972 pub host_id: super::NodeId,
1973 #[doc = "Shadow root."]
1974 pub root: super::Node,
1975 }
1976}