vendor/github.com/go-rod/rod/lib/proto/dom.go

1712 lines · 55313 bytes

   1// This file is generated by "./lib/proto/generate"
   2
   3package proto
   4
   5import (
   6	"github.com/ysmood/gson"
   7)
   8
   9/*
  10
  11DOM
  12
  13This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
  14that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
  15the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
  16nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
  17and never sends the same node twice. It is client's responsibility to collect information about
  18the nodes that were sent to the client. Note that `iframe` owner elements will return
  19corresponding document elements as their child nodes.
  20
  21*/
  22
  23// DOMNodeID Unique DOM node identifier.
  24type DOMNodeID int
  25
  26// DOMBackendNodeID Unique DOM node identifier used to reference a node that may not have been pushed to the
  27// front-end.
  28type DOMBackendNodeID int
  29
  30// DOMBackendNode Backend node with a friendly name.
  31type DOMBackendNode struct {
  32	// NodeType `Node`'s nodeType.
  33	NodeType int `json:"nodeType"`
  34
  35	// NodeName `Node`'s nodeName.
  36	NodeName string `json:"nodeName"`
  37
  38	// BackendNodeID ...
  39	BackendNodeID DOMBackendNodeID `json:"backendNodeId"`
  40}
  41
  42// DOMPseudoType Pseudo element type.
  43type DOMPseudoType string
  44
  45const (
  46	// DOMPseudoTypeFirstLine enum const.
  47	DOMPseudoTypeFirstLine DOMPseudoType = "first-line"
  48
  49	// DOMPseudoTypeFirstLetter enum const.
  50	DOMPseudoTypeFirstLetter DOMPseudoType = "first-letter"
  51
  52	// DOMPseudoTypeBefore enum const.
  53	DOMPseudoTypeBefore DOMPseudoType = "before"
  54
  55	// DOMPseudoTypeAfter enum const.
  56	DOMPseudoTypeAfter DOMPseudoType = "after"
  57
  58	// DOMPseudoTypeMarker enum const.
  59	DOMPseudoTypeMarker DOMPseudoType = "marker"
  60
  61	// DOMPseudoTypeBackdrop enum const.
  62	DOMPseudoTypeBackdrop DOMPseudoType = "backdrop"
  63
  64	// DOMPseudoTypeSelection enum const.
  65	DOMPseudoTypeSelection DOMPseudoType = "selection"
  66
  67	// DOMPseudoTypeSearchText enum const.
  68	DOMPseudoTypeSearchText DOMPseudoType = "search-text"
  69
  70	// DOMPseudoTypeTargetText enum const.
  71	DOMPseudoTypeTargetText DOMPseudoType = "target-text"
  72
  73	// DOMPseudoTypeSpellingError enum const.
  74	DOMPseudoTypeSpellingError DOMPseudoType = "spelling-error"
  75
  76	// DOMPseudoTypeGrammarError enum const.
  77	DOMPseudoTypeGrammarError DOMPseudoType = "grammar-error"
  78
  79	// DOMPseudoTypeHighlight enum const.
  80	DOMPseudoTypeHighlight DOMPseudoType = "highlight"
  81
  82	// DOMPseudoTypeFirstLineInherited enum const.
  83	DOMPseudoTypeFirstLineInherited DOMPseudoType = "first-line-inherited"
  84
  85	// DOMPseudoTypeScrollMarker enum const.
  86	DOMPseudoTypeScrollMarker DOMPseudoType = "scroll-marker"
  87
  88	// DOMPseudoTypeScrollMarkerGroup enum const.
  89	DOMPseudoTypeScrollMarkerGroup DOMPseudoType = "scroll-marker-group"
  90
  91	// DOMPseudoTypeScrollbar enum const.
  92	DOMPseudoTypeScrollbar DOMPseudoType = "scrollbar"
  93
  94	// DOMPseudoTypeScrollbarThumb enum const.
  95	DOMPseudoTypeScrollbarThumb DOMPseudoType = "scrollbar-thumb"
  96
  97	// DOMPseudoTypeScrollbarButton enum const.
  98	DOMPseudoTypeScrollbarButton DOMPseudoType = "scrollbar-button"
  99
 100	// DOMPseudoTypeScrollbarTrack enum const.
 101	DOMPseudoTypeScrollbarTrack DOMPseudoType = "scrollbar-track"
 102
 103	// DOMPseudoTypeScrollbarTrackPiece enum const.
 104	DOMPseudoTypeScrollbarTrackPiece DOMPseudoType = "scrollbar-track-piece"
 105
 106	// DOMPseudoTypeScrollbarCorner enum const.
 107	DOMPseudoTypeScrollbarCorner DOMPseudoType = "scrollbar-corner"
 108
 109	// DOMPseudoTypeResizer enum const.
 110	DOMPseudoTypeResizer DOMPseudoType = "resizer"
 111
 112	// DOMPseudoTypeInputListButton enum const.
 113	DOMPseudoTypeInputListButton DOMPseudoType = "input-list-button"
 114
 115	// DOMPseudoTypeViewTransition enum const.
 116	DOMPseudoTypeViewTransition DOMPseudoType = "view-transition"
 117
 118	// DOMPseudoTypeViewTransitionGroup enum const.
 119	DOMPseudoTypeViewTransitionGroup DOMPseudoType = "view-transition-group"
 120
 121	// DOMPseudoTypeViewTransitionImagePair enum const.
 122	DOMPseudoTypeViewTransitionImagePair DOMPseudoType = "view-transition-image-pair"
 123
 124	// DOMPseudoTypeViewTransitionOld enum const.
 125	DOMPseudoTypeViewTransitionOld DOMPseudoType = "view-transition-old"
 126
 127	// DOMPseudoTypeViewTransitionNew enum const.
 128	DOMPseudoTypeViewTransitionNew DOMPseudoType = "view-transition-new"
 129)
 130
 131// DOMShadowRootType Shadow root type.
 132type DOMShadowRootType string
 133
 134const (
 135	// DOMShadowRootTypeUserAgent enum const.
 136	DOMShadowRootTypeUserAgent DOMShadowRootType = "user-agent"
 137
 138	// DOMShadowRootTypeOpen enum const.
 139	DOMShadowRootTypeOpen DOMShadowRootType = "open"
 140
 141	// DOMShadowRootTypeClosed enum const.
 142	DOMShadowRootTypeClosed DOMShadowRootType = "closed"
 143)
 144
 145// DOMCompatibilityMode Document compatibility mode.
 146type DOMCompatibilityMode string
 147
 148const (
 149	// DOMCompatibilityModeQuirksMode enum const.
 150	DOMCompatibilityModeQuirksMode DOMCompatibilityMode = "QuirksMode"
 151
 152	// DOMCompatibilityModeLimitedQuirksMode enum const.
 153	DOMCompatibilityModeLimitedQuirksMode DOMCompatibilityMode = "LimitedQuirksMode"
 154
 155	// DOMCompatibilityModeNoQuirksMode enum const.
 156	DOMCompatibilityModeNoQuirksMode DOMCompatibilityMode = "NoQuirksMode"
 157)
 158
 159// DOMPhysicalAxes ContainerSelector physical axes.
 160type DOMPhysicalAxes string
 161
 162const (
 163	// DOMPhysicalAxesHorizontal enum const.
 164	DOMPhysicalAxesHorizontal DOMPhysicalAxes = "Horizontal"
 165
 166	// DOMPhysicalAxesVertical enum const.
 167	DOMPhysicalAxesVertical DOMPhysicalAxes = "Vertical"
 168
 169	// DOMPhysicalAxesBoth enum const.
 170	DOMPhysicalAxesBoth DOMPhysicalAxes = "Both"
 171)
 172
 173// DOMLogicalAxes ContainerSelector logical axes.
 174type DOMLogicalAxes string
 175
 176const (
 177	// DOMLogicalAxesInline enum const.
 178	DOMLogicalAxesInline DOMLogicalAxes = "Inline"
 179
 180	// DOMLogicalAxesBlock enum const.
 181	DOMLogicalAxesBlock DOMLogicalAxes = "Block"
 182
 183	// DOMLogicalAxesBoth enum const.
 184	DOMLogicalAxesBoth DOMLogicalAxes = "Both"
 185)
 186
 187// DOMScrollOrientation Physical scroll orientation.
 188type DOMScrollOrientation string
 189
 190const (
 191	// DOMScrollOrientationHorizontal enum const.
 192	DOMScrollOrientationHorizontal DOMScrollOrientation = "horizontal"
 193
 194	// DOMScrollOrientationVertical enum const.
 195	DOMScrollOrientationVertical DOMScrollOrientation = "vertical"
 196)
 197
 198// DOMNode DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
 199// DOMNode is a base node mirror type.
 200type DOMNode struct {
 201	// NodeID Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend
 202	// will only push node with given `id` once. It is aware of all requested nodes and will only
 203	// fire DOM events for nodes known to the client.
 204	NodeID DOMNodeID `json:"nodeId"`
 205
 206	// ParentID (optional) The id of the parent node if any.
 207	ParentID DOMNodeID `json:"parentId,omitempty"`
 208
 209	// BackendNodeID The BackendNodeId for this node.
 210	BackendNodeID DOMBackendNodeID `json:"backendNodeId"`
 211
 212	// NodeType `Node`'s nodeType.
 213	NodeType int `json:"nodeType"`
 214
 215	// NodeName `Node`'s nodeName.
 216	NodeName string `json:"nodeName"`
 217
 218	// LocalName `Node`'s localName.
 219	LocalName string `json:"localName"`
 220
 221	// NodeValue `Node`'s nodeValue.
 222	NodeValue string `json:"nodeValue"`
 223
 224	// ChildNodeCount (optional) Child count for `Container` nodes.
 225	ChildNodeCount *int `json:"childNodeCount,omitempty"`
 226
 227	// Children (optional) Child nodes of this node when requested with children.
 228	Children []*DOMNode `json:"children,omitempty"`
 229
 230	// Attributes (optional) Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
 231	Attributes []string `json:"attributes,omitempty"`
 232
 233	// DocumentURL (optional) Document URL that `Document` or `FrameOwner` node points to.
 234	DocumentURL string `json:"documentURL,omitempty"`
 235
 236	// BaseURL (optional) Base URL that `Document` or `FrameOwner` node uses for URL completion.
 237	BaseURL string `json:"baseURL,omitempty"`
 238
 239	// PublicID (optional) `DocumentType`'s publicId.
 240	PublicID string `json:"publicId,omitempty"`
 241
 242	// SystemID (optional) `DocumentType`'s systemId.
 243	SystemID string `json:"systemId,omitempty"`
 244
 245	// InternalSubset (optional) `DocumentType`'s internalSubset.
 246	InternalSubset string `json:"internalSubset,omitempty"`
 247
 248	// XMLVersion (optional) `Document`'s XML version in case of XML documents.
 249	XMLVersion string `json:"xmlVersion,omitempty"`
 250
 251	// Name (optional) `Attr`'s name.
 252	Name string `json:"name,omitempty"`
 253
 254	// Value (optional) `Attr`'s value.
 255	Value string `json:"value,omitempty"`
 256
 257	// PseudoType (optional) Pseudo element type for this node.
 258	PseudoType DOMPseudoType `json:"pseudoType,omitempty"`
 259
 260	// PseudoIdentifier (optional) Pseudo element identifier for this node. Only present if there is a
 261	// valid pseudoType.
 262	PseudoIdentifier string `json:"pseudoIdentifier,omitempty"`
 263
 264	// ShadowRootType (optional) Shadow root type.
 265	ShadowRootType DOMShadowRootType `json:"shadowRootType,omitempty"`
 266
 267	// FrameID (optional) Frame ID for frame owner elements.
 268	FrameID PageFrameID `json:"frameId,omitempty"`
 269
 270	// ContentDocument (optional) Content document for frame owner elements.
 271	ContentDocument *DOMNode `json:"contentDocument,omitempty"`
 272
 273	// ShadowRoots (optional) Shadow root list for given element host.
 274	ShadowRoots []*DOMNode `json:"shadowRoots,omitempty"`
 275
 276	// TemplateContent (optional) Content document fragment for template elements.
 277	TemplateContent *DOMNode `json:"templateContent,omitempty"`
 278
 279	// PseudoElements (optional) Pseudo elements associated with this node.
 280	PseudoElements []*DOMNode `json:"pseudoElements,omitempty"`
 281
 282	// ImportedDocument (deprecated) (optional) Deprecated, as the HTML Imports API has been removed (crbug.com/937746).
 283	// This property used to return the imported document for the HTMLImport links.
 284	// The property is always undefined now.
 285	ImportedDocument *DOMNode `json:"importedDocument,omitempty"`
 286
 287	// DistributedNodes (optional) Distributed nodes for given insertion point.
 288	DistributedNodes []*DOMBackendNode `json:"distributedNodes,omitempty"`
 289
 290	// IsSVG (optional) Whether the node is SVG.
 291	IsSVG bool `json:"isSVG,omitempty"`
 292
 293	// CompatibilityMode (optional) ...
 294	CompatibilityMode DOMCompatibilityMode `json:"compatibilityMode,omitempty"`
 295
 296	// AssignedSlot (optional) ...
 297	AssignedSlot *DOMBackendNode `json:"assignedSlot,omitempty"`
 298}
 299
 300// DOMRGBA A structure holding an RGBA color.
 301type DOMRGBA struct {
 302	// R The red component, in the [0-255] range.
 303	R int `json:"r"`
 304
 305	// G The green component, in the [0-255] range.
 306	G int `json:"g"`
 307
 308	// B The blue component, in the [0-255] range.
 309	B int `json:"b"`
 310
 311	// A (optional) The alpha component, in the [0-1] range (default: 1).
 312	A *float64 `json:"a,omitempty"`
 313}
 314
 315// DOMQuad An array of quad vertices, x immediately followed by y for each point, points clock-wise.
 316type DOMQuad []float64
 317
 318// DOMBoxModel Box model.
 319type DOMBoxModel struct {
 320	// Content box
 321	Content DOMQuad `json:"content"`
 322
 323	// Padding box
 324	Padding DOMQuad `json:"padding"`
 325
 326	// Border box
 327	Border DOMQuad `json:"border"`
 328
 329	// Margin box
 330	Margin DOMQuad `json:"margin"`
 331
 332	// Width Node width
 333	Width int `json:"width"`
 334
 335	// Height Node height
 336	Height int `json:"height"`
 337
 338	// ShapeOutside (optional) Shape outside coordinates
 339	ShapeOutside *DOMShapeOutsideInfo `json:"shapeOutside,omitempty"`
 340}
 341
 342// DOMShapeOutsideInfo CSS Shape Outside details.
 343type DOMShapeOutsideInfo struct {
 344	// Bounds Shape bounds
 345	Bounds DOMQuad `json:"bounds"`
 346
 347	// Shape coordinate details
 348	Shape []gson.JSON `json:"shape"`
 349
 350	// MarginShape Margin shape bounds
 351	MarginShape []gson.JSON `json:"marginShape"`
 352}
 353
 354// DOMRect Rectangle.
 355type DOMRect struct {
 356	// X coordinate
 357	X float64 `json:"x"`
 358
 359	// Y coordinate
 360	Y float64 `json:"y"`
 361
 362	// Width Rectangle width
 363	Width float64 `json:"width"`
 364
 365	// Height Rectangle height
 366	Height float64 `json:"height"`
 367}
 368
 369// DOMCSSComputedStyleProperty ...
 370type DOMCSSComputedStyleProperty struct {
 371	// Name Computed style property name.
 372	Name string `json:"name"`
 373
 374	// Value Computed style property value.
 375	Value string `json:"value"`
 376}
 377
 378// DOMCollectClassNamesFromSubtree (experimental) Collects class names for the node with given id and all of it's child nodes.
 379type DOMCollectClassNamesFromSubtree struct {
 380	// NodeID Id of the node to collect class names.
 381	NodeID DOMNodeID `json:"nodeId"`
 382}
 383
 384// ProtoReq name.
 385func (m DOMCollectClassNamesFromSubtree) ProtoReq() string { return "DOM.collectClassNamesFromSubtree" }
 386
 387// Call the request.
 388func (m DOMCollectClassNamesFromSubtree) Call(c Client) (*DOMCollectClassNamesFromSubtreeResult, error) {
 389	var res DOMCollectClassNamesFromSubtreeResult
 390	return &res, call(m.ProtoReq(), m, &res, c)
 391}
 392
 393// DOMCollectClassNamesFromSubtreeResult (experimental) ...
 394type DOMCollectClassNamesFromSubtreeResult struct {
 395	// ClassNames Class name list.
 396	ClassNames []string `json:"classNames"`
 397}
 398
 399// DOMCopyTo (experimental) Creates a deep copy of the specified node and places it into the target container before the
 400// given anchor.
 401type DOMCopyTo struct {
 402	// NodeID Id of the node to copy.
 403	NodeID DOMNodeID `json:"nodeId"`
 404
 405	// TargetNodeID Id of the element to drop the copy into.
 406	TargetNodeID DOMNodeID `json:"targetNodeId"`
 407
 408	// InsertBeforeNodeID (optional) Drop the copy before this node (if absent, the copy becomes the last child of
 409	// `targetNodeId`).
 410	InsertBeforeNodeID DOMNodeID `json:"insertBeforeNodeId,omitempty"`
 411}
 412
 413// ProtoReq name.
 414func (m DOMCopyTo) ProtoReq() string { return "DOM.copyTo" }
 415
 416// Call the request.
 417func (m DOMCopyTo) Call(c Client) (*DOMCopyToResult, error) {
 418	var res DOMCopyToResult
 419	return &res, call(m.ProtoReq(), m, &res, c)
 420}
 421
 422// DOMCopyToResult (experimental) ...
 423type DOMCopyToResult struct {
 424	// NodeID Id of the node clone.
 425	NodeID DOMNodeID `json:"nodeId"`
 426}
 427
 428// DOMDescribeNode Describes node given its id, does not require domain to be enabled. Does not start tracking any
 429// objects, can be used for automation.
 430type DOMDescribeNode struct {
 431	// NodeID (optional) Identifier of the node.
 432	NodeID DOMNodeID `json:"nodeId,omitempty"`
 433
 434	// BackendNodeID (optional) Identifier of the backend node.
 435	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 436
 437	// ObjectID (optional) JavaScript object id of the node wrapper.
 438	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 439
 440	// Depth (optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
 441	// entire subtree or provide an integer larger than 0.
 442	Depth *int `json:"depth,omitempty"`
 443
 444	// Pierce (optional) Whether or not iframes and shadow roots should be traversed when returning the subtree
 445	// (default is false).
 446	Pierce bool `json:"pierce,omitempty"`
 447}
 448
 449// ProtoReq name.
 450func (m DOMDescribeNode) ProtoReq() string { return "DOM.describeNode" }
 451
 452// Call the request.
 453func (m DOMDescribeNode) Call(c Client) (*DOMDescribeNodeResult, error) {
 454	var res DOMDescribeNodeResult
 455	return &res, call(m.ProtoReq(), m, &res, c)
 456}
 457
 458// DOMDescribeNodeResult ...
 459type DOMDescribeNodeResult struct {
 460	// Node description.
 461	Node *DOMNode `json:"node"`
 462}
 463
 464// DOMScrollIntoViewIfNeeded Scrolls the specified rect of the given node into view if not already visible.
 465// Note: exactly one between nodeId, backendNodeId and objectId should be passed
 466// to identify the node.
 467type DOMScrollIntoViewIfNeeded struct {
 468	// NodeID (optional) Identifier of the node.
 469	NodeID DOMNodeID `json:"nodeId,omitempty"`
 470
 471	// BackendNodeID (optional) Identifier of the backend node.
 472	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 473
 474	// ObjectID (optional) JavaScript object id of the node wrapper.
 475	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 476
 477	// Rect (optional) The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
 478	// When omitted, center of the node will be used, similar to Element.scrollIntoView.
 479	Rect *DOMRect `json:"rect,omitempty"`
 480}
 481
 482// ProtoReq name.
 483func (m DOMScrollIntoViewIfNeeded) ProtoReq() string { return "DOM.scrollIntoViewIfNeeded" }
 484
 485// Call sends the request.
 486func (m DOMScrollIntoViewIfNeeded) Call(c Client) error {
 487	return call(m.ProtoReq(), m, nil, c)
 488}
 489
 490// DOMDisable Disables DOM agent for the given page.
 491type DOMDisable struct{}
 492
 493// ProtoReq name.
 494func (m DOMDisable) ProtoReq() string { return "DOM.disable" }
 495
 496// Call sends the request.
 497func (m DOMDisable) Call(c Client) error {
 498	return call(m.ProtoReq(), m, nil, c)
 499}
 500
 501// DOMDiscardSearchResults (experimental) Discards search results from the session with the given id. `getSearchResults` should no longer
 502// be called for that search.
 503type DOMDiscardSearchResults struct {
 504	// SearchID Unique search session identifier.
 505	SearchID string `json:"searchId"`
 506}
 507
 508// ProtoReq name.
 509func (m DOMDiscardSearchResults) ProtoReq() string { return "DOM.discardSearchResults" }
 510
 511// Call sends the request.
 512func (m DOMDiscardSearchResults) Call(c Client) error {
 513	return call(m.ProtoReq(), m, nil, c)
 514}
 515
 516// DOMEnableIncludeWhitespace enum.
 517type DOMEnableIncludeWhitespace string
 518
 519const (
 520	// DOMEnableIncludeWhitespaceNone enum const.
 521	DOMEnableIncludeWhitespaceNone DOMEnableIncludeWhitespace = "none"
 522
 523	// DOMEnableIncludeWhitespaceAll enum const.
 524	DOMEnableIncludeWhitespaceAll DOMEnableIncludeWhitespace = "all"
 525)
 526
 527// DOMEnable Enables DOM agent for the given page.
 528type DOMEnable struct {
 529	// IncludeWhitespace (experimental) (optional) Whether to include whitespaces in the children array of returned Nodes.
 530	IncludeWhitespace DOMEnableIncludeWhitespace `json:"includeWhitespace,omitempty"`
 531}
 532
 533// ProtoReq name.
 534func (m DOMEnable) ProtoReq() string { return "DOM.enable" }
 535
 536// Call sends the request.
 537func (m DOMEnable) Call(c Client) error {
 538	return call(m.ProtoReq(), m, nil, c)
 539}
 540
 541// DOMFocus Focuses the given element.
 542type DOMFocus struct {
 543	// NodeID (optional) Identifier of the node.
 544	NodeID DOMNodeID `json:"nodeId,omitempty"`
 545
 546	// BackendNodeID (optional) Identifier of the backend node.
 547	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 548
 549	// ObjectID (optional) JavaScript object id of the node wrapper.
 550	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 551}
 552
 553// ProtoReq name.
 554func (m DOMFocus) ProtoReq() string { return "DOM.focus" }
 555
 556// Call sends the request.
 557func (m DOMFocus) Call(c Client) error {
 558	return call(m.ProtoReq(), m, nil, c)
 559}
 560
 561// DOMGetAttributes Returns attributes for the specified node.
 562type DOMGetAttributes struct {
 563	// NodeID Id of the node to retrieve attributes for.
 564	NodeID DOMNodeID `json:"nodeId"`
 565}
 566
 567// ProtoReq name.
 568func (m DOMGetAttributes) ProtoReq() string { return "DOM.getAttributes" }
 569
 570// Call the request.
 571func (m DOMGetAttributes) Call(c Client) (*DOMGetAttributesResult, error) {
 572	var res DOMGetAttributesResult
 573	return &res, call(m.ProtoReq(), m, &res, c)
 574}
 575
 576// DOMGetAttributesResult ...
 577type DOMGetAttributesResult struct {
 578	// Attributes An interleaved array of node attribute names and values.
 579	Attributes []string `json:"attributes"`
 580}
 581
 582// DOMGetBoxModel Returns boxes for the given node.
 583type DOMGetBoxModel struct {
 584	// NodeID (optional) Identifier of the node.
 585	NodeID DOMNodeID `json:"nodeId,omitempty"`
 586
 587	// BackendNodeID (optional) Identifier of the backend node.
 588	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 589
 590	// ObjectID (optional) JavaScript object id of the node wrapper.
 591	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 592}
 593
 594// ProtoReq name.
 595func (m DOMGetBoxModel) ProtoReq() string { return "DOM.getBoxModel" }
 596
 597// Call the request.
 598func (m DOMGetBoxModel) Call(c Client) (*DOMGetBoxModelResult, error) {
 599	var res DOMGetBoxModelResult
 600	return &res, call(m.ProtoReq(), m, &res, c)
 601}
 602
 603// DOMGetBoxModelResult ...
 604type DOMGetBoxModelResult struct {
 605	// Model Box model for the node.
 606	Model *DOMBoxModel `json:"model"`
 607}
 608
 609// DOMGetContentQuads (experimental) Returns quads that describe node position on the page. This method
 610// might return multiple quads for inline nodes.
 611type DOMGetContentQuads struct {
 612	// NodeID (optional) Identifier of the node.
 613	NodeID DOMNodeID `json:"nodeId,omitempty"`
 614
 615	// BackendNodeID (optional) Identifier of the backend node.
 616	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 617
 618	// ObjectID (optional) JavaScript object id of the node wrapper.
 619	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 620}
 621
 622// ProtoReq name.
 623func (m DOMGetContentQuads) ProtoReq() string { return "DOM.getContentQuads" }
 624
 625// Call the request.
 626func (m DOMGetContentQuads) Call(c Client) (*DOMGetContentQuadsResult, error) {
 627	var res DOMGetContentQuadsResult
 628	return &res, call(m.ProtoReq(), m, &res, c)
 629}
 630
 631// DOMGetContentQuadsResult (experimental) ...
 632type DOMGetContentQuadsResult struct {
 633	// Quads that describe node layout relative to viewport.
 634	Quads []DOMQuad `json:"quads"`
 635}
 636
 637// DOMGetDocument Returns the root DOM node (and optionally the subtree) to the caller.
 638// Implicitly enables the DOM domain events for the current target.
 639type DOMGetDocument struct {
 640	// Depth (optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
 641	// entire subtree or provide an integer larger than 0.
 642	Depth *int `json:"depth,omitempty"`
 643
 644	// Pierce (optional) Whether or not iframes and shadow roots should be traversed when returning the subtree
 645	// (default is false).
 646	Pierce bool `json:"pierce,omitempty"`
 647}
 648
 649// ProtoReq name.
 650func (m DOMGetDocument) ProtoReq() string { return "DOM.getDocument" }
 651
 652// Call the request.
 653func (m DOMGetDocument) Call(c Client) (*DOMGetDocumentResult, error) {
 654	var res DOMGetDocumentResult
 655	return &res, call(m.ProtoReq(), m, &res, c)
 656}
 657
 658// DOMGetDocumentResult ...
 659type DOMGetDocumentResult struct {
 660	// Root Resulting node.
 661	Root *DOMNode `json:"root"`
 662}
 663
 664// DOMGetFlattenedDocument (deprecated) Returns the root DOM node (and optionally the subtree) to the caller.
 665// Deprecated, as it is not designed to work well with the rest of the DOM agent.
 666// Use DOMSnapshot.captureSnapshot instead.
 667type DOMGetFlattenedDocument struct {
 668	// Depth (optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
 669	// entire subtree or provide an integer larger than 0.
 670	Depth *int `json:"depth,omitempty"`
 671
 672	// Pierce (optional) Whether or not iframes and shadow roots should be traversed when returning the subtree
 673	// (default is false).
 674	Pierce bool `json:"pierce,omitempty"`
 675}
 676
 677// ProtoReq name.
 678func (m DOMGetFlattenedDocument) ProtoReq() string { return "DOM.getFlattenedDocument" }
 679
 680// Call the request.
 681func (m DOMGetFlattenedDocument) Call(c Client) (*DOMGetFlattenedDocumentResult, error) {
 682	var res DOMGetFlattenedDocumentResult
 683	return &res, call(m.ProtoReq(), m, &res, c)
 684}
 685
 686// DOMGetFlattenedDocumentResult (deprecated) ...
 687type DOMGetFlattenedDocumentResult struct {
 688	// Nodes Resulting node.
 689	Nodes []*DOMNode `json:"nodes"`
 690}
 691
 692// DOMGetNodesForSubtreeByStyle (experimental) Finds nodes with a given computed style in a subtree.
 693type DOMGetNodesForSubtreeByStyle struct {
 694	// NodeID Node ID pointing to the root of a subtree.
 695	NodeID DOMNodeID `json:"nodeId"`
 696
 697	// ComputedStyles The style to filter nodes by (includes nodes if any of properties matches).
 698	ComputedStyles []*DOMCSSComputedStyleProperty `json:"computedStyles"`
 699
 700	// Pierce (optional) Whether or not iframes and shadow roots in the same target should be traversed when returning the
 701	// results (default is false).
 702	Pierce bool `json:"pierce,omitempty"`
 703}
 704
 705// ProtoReq name.
 706func (m DOMGetNodesForSubtreeByStyle) ProtoReq() string { return "DOM.getNodesForSubtreeByStyle" }
 707
 708// Call the request.
 709func (m DOMGetNodesForSubtreeByStyle) Call(c Client) (*DOMGetNodesForSubtreeByStyleResult, error) {
 710	var res DOMGetNodesForSubtreeByStyleResult
 711	return &res, call(m.ProtoReq(), m, &res, c)
 712}
 713
 714// DOMGetNodesForSubtreeByStyleResult (experimental) ...
 715type DOMGetNodesForSubtreeByStyleResult struct {
 716	// NodeIDs Resulting nodes.
 717	NodeIDs []DOMNodeID `json:"nodeIds"`
 718}
 719
 720// DOMGetNodeForLocation Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
 721// either returned or not.
 722type DOMGetNodeForLocation struct {
 723	// X coordinate.
 724	X int `json:"x"`
 725
 726	// Y coordinate.
 727	Y int `json:"y"`
 728
 729	// IncludeUserAgentShadowDOM (optional) False to skip to the nearest non-UA shadow root ancestor (default: false).
 730	IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"`
 731
 732	// IgnorePointerEventsNone (optional) Whether to ignore pointer-events: none on elements and hit test them.
 733	IgnorePointerEventsNone bool `json:"ignorePointerEventsNone,omitempty"`
 734}
 735
 736// ProtoReq name.
 737func (m DOMGetNodeForLocation) ProtoReq() string { return "DOM.getNodeForLocation" }
 738
 739// Call the request.
 740func (m DOMGetNodeForLocation) Call(c Client) (*DOMGetNodeForLocationResult, error) {
 741	var res DOMGetNodeForLocationResult
 742	return &res, call(m.ProtoReq(), m, &res, c)
 743}
 744
 745// DOMGetNodeForLocationResult ...
 746type DOMGetNodeForLocationResult struct {
 747	// BackendNodeID Resulting node.
 748	BackendNodeID DOMBackendNodeID `json:"backendNodeId"`
 749
 750	// FrameID Frame this node belongs to.
 751	FrameID PageFrameID `json:"frameId"`
 752
 753	// NodeID (optional) Id of the node at given coordinates, only when enabled and requested document.
 754	NodeID DOMNodeID `json:"nodeId,omitempty"`
 755}
 756
 757// DOMGetOuterHTML Returns node's HTML markup.
 758type DOMGetOuterHTML struct {
 759	// NodeID (optional) Identifier of the node.
 760	NodeID DOMNodeID `json:"nodeId,omitempty"`
 761
 762	// BackendNodeID (optional) Identifier of the backend node.
 763	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
 764
 765	// ObjectID (optional) JavaScript object id of the node wrapper.
 766	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
 767}
 768
 769// ProtoReq name.
 770func (m DOMGetOuterHTML) ProtoReq() string { return "DOM.getOuterHTML" }
 771
 772// Call the request.
 773func (m DOMGetOuterHTML) Call(c Client) (*DOMGetOuterHTMLResult, error) {
 774	var res DOMGetOuterHTMLResult
 775	return &res, call(m.ProtoReq(), m, &res, c)
 776}
 777
 778// DOMGetOuterHTMLResult ...
 779type DOMGetOuterHTMLResult struct {
 780	// OuterHTML Outer HTML markup.
 781	OuterHTML string `json:"outerHTML"`
 782}
 783
 784// DOMGetRelayoutBoundary (experimental) Returns the id of the nearest ancestor that is a relayout boundary.
 785type DOMGetRelayoutBoundary struct {
 786	// NodeID Id of the node.
 787	NodeID DOMNodeID `json:"nodeId"`
 788}
 789
 790// ProtoReq name.
 791func (m DOMGetRelayoutBoundary) ProtoReq() string { return "DOM.getRelayoutBoundary" }
 792
 793// Call the request.
 794func (m DOMGetRelayoutBoundary) Call(c Client) (*DOMGetRelayoutBoundaryResult, error) {
 795	var res DOMGetRelayoutBoundaryResult
 796	return &res, call(m.ProtoReq(), m, &res, c)
 797}
 798
 799// DOMGetRelayoutBoundaryResult (experimental) ...
 800type DOMGetRelayoutBoundaryResult struct {
 801	// NodeID Relayout boundary node id for the given node.
 802	NodeID DOMNodeID `json:"nodeId"`
 803}
 804
 805// DOMGetSearchResults (experimental) Returns search results from given `fromIndex` to given `toIndex` from the search with the given
 806// identifier.
 807type DOMGetSearchResults struct {
 808	// SearchID Unique search session identifier.
 809	SearchID string `json:"searchId"`
 810
 811	// FromIndex Start index of the search result to be returned.
 812	FromIndex int `json:"fromIndex"`
 813
 814	// ToIndex End index of the search result to be returned.
 815	ToIndex int `json:"toIndex"`
 816}
 817
 818// ProtoReq name.
 819func (m DOMGetSearchResults) ProtoReq() string { return "DOM.getSearchResults" }
 820
 821// Call the request.
 822func (m DOMGetSearchResults) Call(c Client) (*DOMGetSearchResultsResult, error) {
 823	var res DOMGetSearchResultsResult
 824	return &res, call(m.ProtoReq(), m, &res, c)
 825}
 826
 827// DOMGetSearchResultsResult (experimental) ...
 828type DOMGetSearchResultsResult struct {
 829	// NodeIDs Ids of the search result nodes.
 830	NodeIDs []DOMNodeID `json:"nodeIds"`
 831}
 832
 833// DOMHideHighlight Hides any highlight.
 834type DOMHideHighlight struct{}
 835
 836// ProtoReq name.
 837func (m DOMHideHighlight) ProtoReq() string { return "DOM.hideHighlight" }
 838
 839// Call sends the request.
 840func (m DOMHideHighlight) Call(c Client) error {
 841	return call(m.ProtoReq(), m, nil, c)
 842}
 843
 844// DOMHighlightNode Highlights DOM node.
 845type DOMHighlightNode struct{}
 846
 847// ProtoReq name.
 848func (m DOMHighlightNode) ProtoReq() string { return "DOM.highlightNode" }
 849
 850// Call sends the request.
 851func (m DOMHighlightNode) Call(c Client) error {
 852	return call(m.ProtoReq(), m, nil, c)
 853}
 854
 855// DOMHighlightRect Highlights given rectangle.
 856type DOMHighlightRect struct{}
 857
 858// ProtoReq name.
 859func (m DOMHighlightRect) ProtoReq() string { return "DOM.highlightRect" }
 860
 861// Call sends the request.
 862func (m DOMHighlightRect) Call(c Client) error {
 863	return call(m.ProtoReq(), m, nil, c)
 864}
 865
 866// DOMMarkUndoableState (experimental) Marks last undoable state.
 867type DOMMarkUndoableState struct{}
 868
 869// ProtoReq name.
 870func (m DOMMarkUndoableState) ProtoReq() string { return "DOM.markUndoableState" }
 871
 872// Call sends the request.
 873func (m DOMMarkUndoableState) Call(c Client) error {
 874	return call(m.ProtoReq(), m, nil, c)
 875}
 876
 877// DOMMoveTo Moves node into the new container, places it before the given anchor.
 878type DOMMoveTo struct {
 879	// NodeID Id of the node to move.
 880	NodeID DOMNodeID `json:"nodeId"`
 881
 882	// TargetNodeID Id of the element to drop the moved node into.
 883	TargetNodeID DOMNodeID `json:"targetNodeId"`
 884
 885	// InsertBeforeNodeID (optional) Drop node before this one (if absent, the moved node becomes the last child of
 886	// `targetNodeId`).
 887	InsertBeforeNodeID DOMNodeID `json:"insertBeforeNodeId,omitempty"`
 888}
 889
 890// ProtoReq name.
 891func (m DOMMoveTo) ProtoReq() string { return "DOM.moveTo" }
 892
 893// Call the request.
 894func (m DOMMoveTo) Call(c Client) (*DOMMoveToResult, error) {
 895	var res DOMMoveToResult
 896	return &res, call(m.ProtoReq(), m, &res, c)
 897}
 898
 899// DOMMoveToResult ...
 900type DOMMoveToResult struct {
 901	// NodeID New id of the moved node.
 902	NodeID DOMNodeID `json:"nodeId"`
 903}
 904
 905// DOMPerformSearch (experimental) Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
 906// `cancelSearch` to end this search session.
 907type DOMPerformSearch struct {
 908	// Query Plain text or query selector or XPath search query.
 909	Query string `json:"query"`
 910
 911	// IncludeUserAgentShadowDOM (optional) True to search in user agent shadow DOM.
 912	IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"`
 913}
 914
 915// ProtoReq name.
 916func (m DOMPerformSearch) ProtoReq() string { return "DOM.performSearch" }
 917
 918// Call the request.
 919func (m DOMPerformSearch) Call(c Client) (*DOMPerformSearchResult, error) {
 920	var res DOMPerformSearchResult
 921	return &res, call(m.ProtoReq(), m, &res, c)
 922}
 923
 924// DOMPerformSearchResult (experimental) ...
 925type DOMPerformSearchResult struct {
 926	// SearchID Unique search session identifier.
 927	SearchID string `json:"searchId"`
 928
 929	// ResultCount Number of search results.
 930	ResultCount int `json:"resultCount"`
 931}
 932
 933// DOMPushNodeByPathToFrontend (experimental) Requests that the node is sent to the caller given its path. // FIXME, use XPath.
 934type DOMPushNodeByPathToFrontend struct {
 935	// Path to node in the proprietary format.
 936	Path string `json:"path"`
 937}
 938
 939// ProtoReq name.
 940func (m DOMPushNodeByPathToFrontend) ProtoReq() string { return "DOM.pushNodeByPathToFrontend" }
 941
 942// Call the request.
 943func (m DOMPushNodeByPathToFrontend) Call(c Client) (*DOMPushNodeByPathToFrontendResult, error) {
 944	var res DOMPushNodeByPathToFrontendResult
 945	return &res, call(m.ProtoReq(), m, &res, c)
 946}
 947
 948// DOMPushNodeByPathToFrontendResult (experimental) ...
 949type DOMPushNodeByPathToFrontendResult struct {
 950	// NodeID Id of the node for given path.
 951	NodeID DOMNodeID `json:"nodeId"`
 952}
 953
 954// DOMPushNodesByBackendIDsToFrontend (experimental) Requests that a batch of nodes is sent to the caller given their backend node ids.
 955type DOMPushNodesByBackendIDsToFrontend struct {
 956	// BackendNodeIDs The array of backend node ids.
 957	BackendNodeIDs []DOMBackendNodeID `json:"backendNodeIds"`
 958}
 959
 960// ProtoReq name.
 961func (m DOMPushNodesByBackendIDsToFrontend) ProtoReq() string {
 962	return "DOM.pushNodesByBackendIdsToFrontend"
 963}
 964
 965// Call the request.
 966func (m DOMPushNodesByBackendIDsToFrontend) Call(c Client) (*DOMPushNodesByBackendIDsToFrontendResult, error) {
 967	var res DOMPushNodesByBackendIDsToFrontendResult
 968	return &res, call(m.ProtoReq(), m, &res, c)
 969}
 970
 971// DOMPushNodesByBackendIDsToFrontendResult (experimental) ...
 972type DOMPushNodesByBackendIDsToFrontendResult struct {
 973	// NodeIDs The array of ids of pushed nodes that correspond to the backend ids specified in
 974	// backendNodeIds.
 975	NodeIDs []DOMNodeID `json:"nodeIds"`
 976}
 977
 978// DOMQuerySelector Executes `querySelector` on a given node.
 979type DOMQuerySelector struct {
 980	// NodeID Id of the node to query upon.
 981	NodeID DOMNodeID `json:"nodeId"`
 982
 983	// Selector string.
 984	Selector string `json:"selector"`
 985}
 986
 987// ProtoReq name.
 988func (m DOMQuerySelector) ProtoReq() string { return "DOM.querySelector" }
 989
 990// Call the request.
 991func (m DOMQuerySelector) Call(c Client) (*DOMQuerySelectorResult, error) {
 992	var res DOMQuerySelectorResult
 993	return &res, call(m.ProtoReq(), m, &res, c)
 994}
 995
 996// DOMQuerySelectorResult ...
 997type DOMQuerySelectorResult struct {
 998	// NodeID Query selector result.
 999	NodeID DOMNodeID `json:"nodeId"`
1000}
1001
1002// DOMQuerySelectorAll Executes `querySelectorAll` on a given node.
1003type DOMQuerySelectorAll struct {
1004	// NodeID Id of the node to query upon.
1005	NodeID DOMNodeID `json:"nodeId"`
1006
1007	// Selector string.
1008	Selector string `json:"selector"`
1009}
1010
1011// ProtoReq name.
1012func (m DOMQuerySelectorAll) ProtoReq() string { return "DOM.querySelectorAll" }
1013
1014// Call the request.
1015func (m DOMQuerySelectorAll) Call(c Client) (*DOMQuerySelectorAllResult, error) {
1016	var res DOMQuerySelectorAllResult
1017	return &res, call(m.ProtoReq(), m, &res, c)
1018}
1019
1020// DOMQuerySelectorAllResult ...
1021type DOMQuerySelectorAllResult struct {
1022	// NodeIDs Query selector result.
1023	NodeIDs []DOMNodeID `json:"nodeIds"`
1024}
1025
1026// DOMGetTopLayerElements (experimental) Returns NodeIds of current top layer elements.
1027// Top layer is rendered closest to the user within a viewport, therefore its elements always
1028// appear on top of all other content.
1029type DOMGetTopLayerElements struct{}
1030
1031// ProtoReq name.
1032func (m DOMGetTopLayerElements) ProtoReq() string { return "DOM.getTopLayerElements" }
1033
1034// Call the request.
1035func (m DOMGetTopLayerElements) Call(c Client) (*DOMGetTopLayerElementsResult, error) {
1036	var res DOMGetTopLayerElementsResult
1037	return &res, call(m.ProtoReq(), m, &res, c)
1038}
1039
1040// DOMGetTopLayerElementsResult (experimental) ...
1041type DOMGetTopLayerElementsResult struct {
1042	// NodeIDs NodeIds of top layer elements
1043	NodeIDs []DOMNodeID `json:"nodeIds"`
1044}
1045
1046// DOMGetElementByRelationRelation enum.
1047type DOMGetElementByRelationRelation string
1048
1049const (
1050	// DOMGetElementByRelationRelationPopoverTarget enum const.
1051	DOMGetElementByRelationRelationPopoverTarget DOMGetElementByRelationRelation = "PopoverTarget"
1052)
1053
1054// DOMGetElementByRelation (experimental) Returns the NodeId of the matched element according to certain relations.
1055type DOMGetElementByRelation struct {
1056	// NodeID Id of the node from which to query the relation.
1057	NodeID DOMNodeID `json:"nodeId"`
1058
1059	// Relation Type of relation to get.
1060	Relation DOMGetElementByRelationRelation `json:"relation"`
1061}
1062
1063// ProtoReq name.
1064func (m DOMGetElementByRelation) ProtoReq() string { return "DOM.getElementByRelation" }
1065
1066// Call the request.
1067func (m DOMGetElementByRelation) Call(c Client) (*DOMGetElementByRelationResult, error) {
1068	var res DOMGetElementByRelationResult
1069	return &res, call(m.ProtoReq(), m, &res, c)
1070}
1071
1072// DOMGetElementByRelationResult (experimental) ...
1073type DOMGetElementByRelationResult struct {
1074	// NodeID NodeId of the element matching the queried relation.
1075	NodeID DOMNodeID `json:"nodeId"`
1076}
1077
1078// DOMRedo (experimental) Re-does the last undone action.
1079type DOMRedo struct{}
1080
1081// ProtoReq name.
1082func (m DOMRedo) ProtoReq() string { return "DOM.redo" }
1083
1084// Call sends the request.
1085func (m DOMRedo) Call(c Client) error {
1086	return call(m.ProtoReq(), m, nil, c)
1087}
1088
1089// DOMRemoveAttribute Removes attribute with given name from an element with given id.
1090type DOMRemoveAttribute struct {
1091	// NodeID Id of the element to remove attribute from.
1092	NodeID DOMNodeID `json:"nodeId"`
1093
1094	// Name of the attribute to remove.
1095	Name string `json:"name"`
1096}
1097
1098// ProtoReq name.
1099func (m DOMRemoveAttribute) ProtoReq() string { return "DOM.removeAttribute" }
1100
1101// Call sends the request.
1102func (m DOMRemoveAttribute) Call(c Client) error {
1103	return call(m.ProtoReq(), m, nil, c)
1104}
1105
1106// DOMRemoveNode Removes node with given id.
1107type DOMRemoveNode struct {
1108	// NodeID Id of the node to remove.
1109	NodeID DOMNodeID `json:"nodeId"`
1110}
1111
1112// ProtoReq name.
1113func (m DOMRemoveNode) ProtoReq() string { return "DOM.removeNode" }
1114
1115// Call sends the request.
1116func (m DOMRemoveNode) Call(c Client) error {
1117	return call(m.ProtoReq(), m, nil, c)
1118}
1119
1120// DOMRequestChildNodes Requests that children of the node with given id are returned to the caller in form of
1121// `setChildNodes` events where not only immediate children are retrieved, but all children down to
1122// the specified depth.
1123type DOMRequestChildNodes struct {
1124	// NodeID Id of the node to get children for.
1125	NodeID DOMNodeID `json:"nodeId"`
1126
1127	// Depth (optional) The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
1128	// entire subtree or provide an integer larger than 0.
1129	Depth *int `json:"depth,omitempty"`
1130
1131	// Pierce (optional) Whether or not iframes and shadow roots should be traversed when returning the sub-tree
1132	// (default is false).
1133	Pierce bool `json:"pierce,omitempty"`
1134}
1135
1136// ProtoReq name.
1137func (m DOMRequestChildNodes) ProtoReq() string { return "DOM.requestChildNodes" }
1138
1139// Call sends the request.
1140func (m DOMRequestChildNodes) Call(c Client) error {
1141	return call(m.ProtoReq(), m, nil, c)
1142}
1143
1144// DOMRequestNode Requests that the node is sent to the caller given the JavaScript node object reference. All
1145// nodes that form the path from the node to the root are also sent to the client as a series of
1146// `setChildNodes` notifications.
1147type DOMRequestNode struct {
1148	// ObjectID JavaScript object id to convert into node.
1149	ObjectID RuntimeRemoteObjectID `json:"objectId"`
1150}
1151
1152// ProtoReq name.
1153func (m DOMRequestNode) ProtoReq() string { return "DOM.requestNode" }
1154
1155// Call the request.
1156func (m DOMRequestNode) Call(c Client) (*DOMRequestNodeResult, error) {
1157	var res DOMRequestNodeResult
1158	return &res, call(m.ProtoReq(), m, &res, c)
1159}
1160
1161// DOMRequestNodeResult ...
1162type DOMRequestNodeResult struct {
1163	// NodeID Node id for given object.
1164	NodeID DOMNodeID `json:"nodeId"`
1165}
1166
1167// DOMResolveNode Resolves the JavaScript node object for a given NodeId or BackendNodeId.
1168type DOMResolveNode struct {
1169	// NodeID (optional) Id of the node to resolve.
1170	NodeID DOMNodeID `json:"nodeId,omitempty"`
1171
1172	// BackendNodeID (optional) Backend identifier of the node to resolve.
1173	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
1174
1175	// ObjectGroup (optional) Symbolic group name that can be used to release multiple objects.
1176	ObjectGroup string `json:"objectGroup,omitempty"`
1177
1178	// ExecutionContextID (optional) Execution context in which to resolve the node.
1179	ExecutionContextID RuntimeExecutionContextID `json:"executionContextId,omitempty"`
1180}
1181
1182// ProtoReq name.
1183func (m DOMResolveNode) ProtoReq() string { return "DOM.resolveNode" }
1184
1185// Call the request.
1186func (m DOMResolveNode) Call(c Client) (*DOMResolveNodeResult, error) {
1187	var res DOMResolveNodeResult
1188	return &res, call(m.ProtoReq(), m, &res, c)
1189}
1190
1191// DOMResolveNodeResult ...
1192type DOMResolveNodeResult struct {
1193	// Object JavaScript object wrapper for given node.
1194	Object *RuntimeRemoteObject `json:"object"`
1195}
1196
1197// DOMSetAttributeValue Sets attribute for an element with given id.
1198type DOMSetAttributeValue struct {
1199	// NodeID Id of the element to set attribute for.
1200	NodeID DOMNodeID `json:"nodeId"`
1201
1202	// Name Attribute name.
1203	Name string `json:"name"`
1204
1205	// Value Attribute value.
1206	Value string `json:"value"`
1207}
1208
1209// ProtoReq name.
1210func (m DOMSetAttributeValue) ProtoReq() string { return "DOM.setAttributeValue" }
1211
1212// Call sends the request.
1213func (m DOMSetAttributeValue) Call(c Client) error {
1214	return call(m.ProtoReq(), m, nil, c)
1215}
1216
1217// DOMSetAttributesAsText Sets attributes on element with given id. This method is useful when user edits some existing
1218// attribute value and types in several attribute name/value pairs.
1219type DOMSetAttributesAsText struct {
1220	// NodeID Id of the element to set attributes for.
1221	NodeID DOMNodeID `json:"nodeId"`
1222
1223	// Text with a number of attributes. Will parse this text using HTML parser.
1224	Text string `json:"text"`
1225
1226	// Name (optional) Attribute name to replace with new attributes derived from text in case text parsed
1227	// successfully.
1228	Name string `json:"name,omitempty"`
1229}
1230
1231// ProtoReq name.
1232func (m DOMSetAttributesAsText) ProtoReq() string { return "DOM.setAttributesAsText" }
1233
1234// Call sends the request.
1235func (m DOMSetAttributesAsText) Call(c Client) error {
1236	return call(m.ProtoReq(), m, nil, c)
1237}
1238
1239// DOMSetFileInputFiles Sets files for the given file input element.
1240type DOMSetFileInputFiles struct {
1241	// Files Array of file paths to set.
1242	Files []string `json:"files"`
1243
1244	// NodeID (optional) Identifier of the node.
1245	NodeID DOMNodeID `json:"nodeId,omitempty"`
1246
1247	// BackendNodeID (optional) Identifier of the backend node.
1248	BackendNodeID DOMBackendNodeID `json:"backendNodeId,omitempty"`
1249
1250	// ObjectID (optional) JavaScript object id of the node wrapper.
1251	ObjectID RuntimeRemoteObjectID `json:"objectId,omitempty"`
1252}
1253
1254// ProtoReq name.
1255func (m DOMSetFileInputFiles) ProtoReq() string { return "DOM.setFileInputFiles" }
1256
1257// Call sends the request.
1258func (m DOMSetFileInputFiles) Call(c Client) error {
1259	return call(m.ProtoReq(), m, nil, c)
1260}
1261
1262// DOMSetNodeStackTracesEnabled (experimental) Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
1263type DOMSetNodeStackTracesEnabled struct {
1264	// Enable or disable.
1265	Enable bool `json:"enable"`
1266}
1267
1268// ProtoReq name.
1269func (m DOMSetNodeStackTracesEnabled) ProtoReq() string { return "DOM.setNodeStackTracesEnabled" }
1270
1271// Call sends the request.
1272func (m DOMSetNodeStackTracesEnabled) Call(c Client) error {
1273	return call(m.ProtoReq(), m, nil, c)
1274}
1275
1276// DOMGetNodeStackTraces (experimental) Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
1277type DOMGetNodeStackTraces struct {
1278	// NodeID Id of the node to get stack traces for.
1279	NodeID DOMNodeID `json:"nodeId"`
1280}
1281
1282// ProtoReq name.
1283func (m DOMGetNodeStackTraces) ProtoReq() string { return "DOM.getNodeStackTraces" }
1284
1285// Call the request.
1286func (m DOMGetNodeStackTraces) Call(c Client) (*DOMGetNodeStackTracesResult, error) {
1287	var res DOMGetNodeStackTracesResult
1288	return &res, call(m.ProtoReq(), m, &res, c)
1289}
1290
1291// DOMGetNodeStackTracesResult (experimental) ...
1292type DOMGetNodeStackTracesResult struct {
1293	// Creation (optional) Creation stack trace, if available.
1294	Creation *RuntimeStackTrace `json:"creation,omitempty"`
1295}
1296
1297// DOMGetFileInfo (experimental) Returns file information for the given
1298// File wrapper.
1299type DOMGetFileInfo struct {
1300	// ObjectID JavaScript object id of the node wrapper.
1301	ObjectID RuntimeRemoteObjectID `json:"objectId"`
1302}
1303
1304// ProtoReq name.
1305func (m DOMGetFileInfo) ProtoReq() string { return "DOM.getFileInfo" }
1306
1307// Call the request.
1308func (m DOMGetFileInfo) Call(c Client) (*DOMGetFileInfoResult, error) {
1309	var res DOMGetFileInfoResult
1310	return &res, call(m.ProtoReq(), m, &res, c)
1311}
1312
1313// DOMGetFileInfoResult (experimental) ...
1314type DOMGetFileInfoResult struct {
1315	// Path ...
1316	Path string `json:"path"`
1317}
1318
1319// DOMSetInspectedNode (experimental) Enables console to refer to the node with given id via $x (see Command Line API for more details
1320// $x functions).
1321type DOMSetInspectedNode struct {
1322	// NodeID DOM node id to be accessible by means of $x command line API.
1323	NodeID DOMNodeID `json:"nodeId"`
1324}
1325
1326// ProtoReq name.
1327func (m DOMSetInspectedNode) ProtoReq() string { return "DOM.setInspectedNode" }
1328
1329// Call sends the request.
1330func (m DOMSetInspectedNode) Call(c Client) error {
1331	return call(m.ProtoReq(), m, nil, c)
1332}
1333
1334// DOMSetNodeName Sets node name for a node with given id.
1335type DOMSetNodeName struct {
1336	// NodeID Id of the node to set name for.
1337	NodeID DOMNodeID `json:"nodeId"`
1338
1339	// Name New node's name.
1340	Name string `json:"name"`
1341}
1342
1343// ProtoReq name.
1344func (m DOMSetNodeName) ProtoReq() string { return "DOM.setNodeName" }
1345
1346// Call the request.
1347func (m DOMSetNodeName) Call(c Client) (*DOMSetNodeNameResult, error) {
1348	var res DOMSetNodeNameResult
1349	return &res, call(m.ProtoReq(), m, &res, c)
1350}
1351
1352// DOMSetNodeNameResult ...
1353type DOMSetNodeNameResult struct {
1354	// NodeID New node's id.
1355	NodeID DOMNodeID `json:"nodeId"`
1356}
1357
1358// DOMSetNodeValue Sets node value for a node with given id.
1359type DOMSetNodeValue struct {
1360	// NodeID Id of the node to set value for.
1361	NodeID DOMNodeID `json:"nodeId"`
1362
1363	// Value New node's value.
1364	Value string `json:"value"`
1365}
1366
1367// ProtoReq name.
1368func (m DOMSetNodeValue) ProtoReq() string { return "DOM.setNodeValue" }
1369
1370// Call sends the request.
1371func (m DOMSetNodeValue) Call(c Client) error {
1372	return call(m.ProtoReq(), m, nil, c)
1373}
1374
1375// DOMSetOuterHTML Sets node HTML markup, returns new node id.
1376type DOMSetOuterHTML struct {
1377	// NodeID Id of the node to set markup for.
1378	NodeID DOMNodeID `json:"nodeId"`
1379
1380	// OuterHTML Outer HTML markup to set.
1381	OuterHTML string `json:"outerHTML"`
1382}
1383
1384// ProtoReq name.
1385func (m DOMSetOuterHTML) ProtoReq() string { return "DOM.setOuterHTML" }
1386
1387// Call sends the request.
1388func (m DOMSetOuterHTML) Call(c Client) error {
1389	return call(m.ProtoReq(), m, nil, c)
1390}
1391
1392// DOMUndo (experimental) Undoes the last performed action.
1393type DOMUndo struct{}
1394
1395// ProtoReq name.
1396func (m DOMUndo) ProtoReq() string { return "DOM.undo" }
1397
1398// Call sends the request.
1399func (m DOMUndo) Call(c Client) error {
1400	return call(m.ProtoReq(), m, nil, c)
1401}
1402
1403// DOMGetFrameOwner (experimental) Returns iframe node that owns iframe with the given domain.
1404type DOMGetFrameOwner struct {
1405	// FrameID ...
1406	FrameID PageFrameID `json:"frameId"`
1407}
1408
1409// ProtoReq name.
1410func (m DOMGetFrameOwner) ProtoReq() string { return "DOM.getFrameOwner" }
1411
1412// Call the request.
1413func (m DOMGetFrameOwner) Call(c Client) (*DOMGetFrameOwnerResult, error) {
1414	var res DOMGetFrameOwnerResult
1415	return &res, call(m.ProtoReq(), m, &res, c)
1416}
1417
1418// DOMGetFrameOwnerResult (experimental) ...
1419type DOMGetFrameOwnerResult struct {
1420	// BackendNodeID Resulting node.
1421	BackendNodeID DOMBackendNodeID `json:"backendNodeId"`
1422
1423	// NodeID (optional) Id of the node at given coordinates, only when enabled and requested document.
1424	NodeID DOMNodeID `json:"nodeId,omitempty"`
1425}
1426
1427// DOMGetContainerForNode (experimental) Returns the query container of the given node based on container query
1428// conditions: containerName, physical, and logical axes. If no axes are
1429// provided, the style container is returned, which is the direct parent or the
1430// closest element with a matching container-name.
1431type DOMGetContainerForNode struct {
1432	// NodeID ...
1433	NodeID DOMNodeID `json:"nodeId"`
1434
1435	// ContainerName (optional) ...
1436	ContainerName string `json:"containerName,omitempty"`
1437
1438	// PhysicalAxes (optional) ...
1439	PhysicalAxes DOMPhysicalAxes `json:"physicalAxes,omitempty"`
1440
1441	// LogicalAxes (optional) ...
1442	LogicalAxes DOMLogicalAxes `json:"logicalAxes,omitempty"`
1443}
1444
1445// ProtoReq name.
1446func (m DOMGetContainerForNode) ProtoReq() string { return "DOM.getContainerForNode" }
1447
1448// Call the request.
1449func (m DOMGetContainerForNode) Call(c Client) (*DOMGetContainerForNodeResult, error) {
1450	var res DOMGetContainerForNodeResult
1451	return &res, call(m.ProtoReq(), m, &res, c)
1452}
1453
1454// DOMGetContainerForNodeResult (experimental) ...
1455type DOMGetContainerForNodeResult struct {
1456	// NodeID (optional) The container node for the given node, or null if not found.
1457	NodeID DOMNodeID `json:"nodeId,omitempty"`
1458}
1459
1460// DOMGetQueryingDescendantsForContainer (experimental) Returns the descendants of a container query container that have
1461// container queries against this container.
1462type DOMGetQueryingDescendantsForContainer struct {
1463	// NodeID Id of the container node to find querying descendants from.
1464	NodeID DOMNodeID `json:"nodeId"`
1465}
1466
1467// ProtoReq name.
1468func (m DOMGetQueryingDescendantsForContainer) ProtoReq() string {
1469	return "DOM.getQueryingDescendantsForContainer"
1470}
1471
1472// Call the request.
1473func (m DOMGetQueryingDescendantsForContainer) Call(c Client) (*DOMGetQueryingDescendantsForContainerResult, error) {
1474	var res DOMGetQueryingDescendantsForContainerResult
1475	return &res, call(m.ProtoReq(), m, &res, c)
1476}
1477
1478// DOMGetQueryingDescendantsForContainerResult (experimental) ...
1479type DOMGetQueryingDescendantsForContainerResult struct {
1480	// NodeIDs Descendant nodes with container queries against the given container.
1481	NodeIDs []DOMNodeID `json:"nodeIds"`
1482}
1483
1484// DOMGetAnchorElement (experimental) Returns the target anchor element of the given anchor query according to
1485// https://www.w3.org/TR/css-anchor-position-1/#target.
1486type DOMGetAnchorElement struct {
1487	// NodeID Id of the positioned element from which to find the anchor.
1488	NodeID DOMNodeID `json:"nodeId"`
1489
1490	// AnchorSpecifier (optional) An optional anchor specifier, as defined in
1491	// https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
1492	// If not provided, it will return the implicit anchor element for
1493	// the given positioned element.
1494	AnchorSpecifier string `json:"anchorSpecifier,omitempty"`
1495}
1496
1497// ProtoReq name.
1498func (m DOMGetAnchorElement) ProtoReq() string { return "DOM.getAnchorElement" }
1499
1500// Call the request.
1501func (m DOMGetAnchorElement) Call(c Client) (*DOMGetAnchorElementResult, error) {
1502	var res DOMGetAnchorElementResult
1503	return &res, call(m.ProtoReq(), m, &res, c)
1504}
1505
1506// DOMGetAnchorElementResult (experimental) ...
1507type DOMGetAnchorElementResult struct {
1508	// NodeID The anchor element of the given anchor query.
1509	NodeID DOMNodeID `json:"nodeId"`
1510}
1511
1512// DOMAttributeModified Fired when `Element`'s attribute is modified.
1513type DOMAttributeModified struct {
1514	// NodeID Id of the node that has changed.
1515	NodeID DOMNodeID `json:"nodeId"`
1516
1517	// Name Attribute name.
1518	Name string `json:"name"`
1519
1520	// Value Attribute value.
1521	Value string `json:"value"`
1522}
1523
1524// ProtoEvent name.
1525func (evt DOMAttributeModified) ProtoEvent() string {
1526	return "DOM.attributeModified"
1527}
1528
1529// DOMAttributeRemoved Fired when `Element`'s attribute is removed.
1530type DOMAttributeRemoved struct {
1531	// NodeID Id of the node that has changed.
1532	NodeID DOMNodeID `json:"nodeId"`
1533
1534	// Name A ttribute name.
1535	Name string `json:"name"`
1536}
1537
1538// ProtoEvent name.
1539func (evt DOMAttributeRemoved) ProtoEvent() string {
1540	return "DOM.attributeRemoved"
1541}
1542
1543// DOMCharacterDataModified Mirrors `DOMCharacterDataModified` event.
1544type DOMCharacterDataModified struct {
1545	// NodeID Id of the node that has changed.
1546	NodeID DOMNodeID `json:"nodeId"`
1547
1548	// CharacterData New text value.
1549	CharacterData string `json:"characterData"`
1550}
1551
1552// ProtoEvent name.
1553func (evt DOMCharacterDataModified) ProtoEvent() string {
1554	return "DOM.characterDataModified"
1555}
1556
1557// DOMChildNodeCountUpdated Fired when `Container`'s child node count has changed.
1558type DOMChildNodeCountUpdated struct {
1559	// NodeID Id of the node that has changed.
1560	NodeID DOMNodeID `json:"nodeId"`
1561
1562	// ChildNodeCount New node count.
1563	ChildNodeCount int `json:"childNodeCount"`
1564}
1565
1566// ProtoEvent name.
1567func (evt DOMChildNodeCountUpdated) ProtoEvent() string {
1568	return "DOM.childNodeCountUpdated"
1569}
1570
1571// DOMChildNodeInserted Mirrors `DOMNodeInserted` event.
1572type DOMChildNodeInserted struct {
1573	// ParentNodeID Id of the node that has changed.
1574	ParentNodeID DOMNodeID `json:"parentNodeId"`
1575
1576	// PreviousNodeID Id of the previous sibling.
1577	PreviousNodeID DOMNodeID `json:"previousNodeId"`
1578
1579	// Node Inserted node data.
1580	Node *DOMNode `json:"node"`
1581}
1582
1583// ProtoEvent name.
1584func (evt DOMChildNodeInserted) ProtoEvent() string {
1585	return "DOM.childNodeInserted"
1586}
1587
1588// DOMChildNodeRemoved Mirrors `DOMNodeRemoved` event.
1589type DOMChildNodeRemoved struct {
1590	// ParentNodeID Parent id.
1591	ParentNodeID DOMNodeID `json:"parentNodeId"`
1592
1593	// NodeID Id of the node that has been removed.
1594	NodeID DOMNodeID `json:"nodeId"`
1595}
1596
1597// ProtoEvent name.
1598func (evt DOMChildNodeRemoved) ProtoEvent() string {
1599	return "DOM.childNodeRemoved"
1600}
1601
1602// DOMDistributedNodesUpdated (experimental) Called when distribution is changed.
1603type DOMDistributedNodesUpdated struct {
1604	// InsertionPointID Insertion point where distributed nodes were updated.
1605	InsertionPointID DOMNodeID `json:"insertionPointId"`
1606
1607	// DistributedNodes Distributed nodes for given insertion point.
1608	DistributedNodes []*DOMBackendNode `json:"distributedNodes"`
1609}
1610
1611// ProtoEvent name.
1612func (evt DOMDistributedNodesUpdated) ProtoEvent() string {
1613	return "DOM.distributedNodesUpdated"
1614}
1615
1616// DOMDocumentUpdated Fired when `Document` has been totally updated. Node ids are no longer valid.
1617type DOMDocumentUpdated struct{}
1618
1619// ProtoEvent name.
1620func (evt DOMDocumentUpdated) ProtoEvent() string {
1621	return "DOM.documentUpdated"
1622}
1623
1624// DOMInlineStyleInvalidated (experimental) Fired when `Element`'s inline style is modified via a CSS property modification.
1625type DOMInlineStyleInvalidated struct {
1626	// NodeIDs Ids of the nodes for which the inline styles have been invalidated.
1627	NodeIDs []DOMNodeID `json:"nodeIds"`
1628}
1629
1630// ProtoEvent name.
1631func (evt DOMInlineStyleInvalidated) ProtoEvent() string {
1632	return "DOM.inlineStyleInvalidated"
1633}
1634
1635// DOMPseudoElementAdded (experimental) Called when a pseudo element is added to an element.
1636type DOMPseudoElementAdded struct {
1637	// ParentID Pseudo element's parent element id.
1638	ParentID DOMNodeID `json:"parentId"`
1639
1640	// PseudoElement The added pseudo element.
1641	PseudoElement *DOMNode `json:"pseudoElement"`
1642}
1643
1644// ProtoEvent name.
1645func (evt DOMPseudoElementAdded) ProtoEvent() string {
1646	return "DOM.pseudoElementAdded"
1647}
1648
1649// DOMTopLayerElementsUpdated (experimental) Called when top layer elements are changed.
1650type DOMTopLayerElementsUpdated struct{}
1651
1652// ProtoEvent name.
1653func (evt DOMTopLayerElementsUpdated) ProtoEvent() string {
1654	return "DOM.topLayerElementsUpdated"
1655}
1656
1657// DOMPseudoElementRemoved (experimental) Called when a pseudo element is removed from an element.
1658type DOMPseudoElementRemoved struct {
1659	// ParentID Pseudo element's parent element id.
1660	ParentID DOMNodeID `json:"parentId"`
1661
1662	// PseudoElementID The removed pseudo element id.
1663	PseudoElementID DOMNodeID `json:"pseudoElementId"`
1664}
1665
1666// ProtoEvent name.
1667func (evt DOMPseudoElementRemoved) ProtoEvent() string {
1668	return "DOM.pseudoElementRemoved"
1669}
1670
1671// DOMSetChildNodes Fired when backend wants to provide client with the missing DOM structure. This happens upon
1672// most of the calls requesting node ids.
1673type DOMSetChildNodes struct {
1674	// ParentID Parent node id to populate with children.
1675	ParentID DOMNodeID `json:"parentId"`
1676
1677	// Nodes Child nodes array.
1678	Nodes []*DOMNode `json:"nodes"`
1679}
1680
1681// ProtoEvent name.
1682func (evt DOMSetChildNodes) ProtoEvent() string {
1683	return "DOM.setChildNodes"
1684}
1685
1686// DOMShadowRootPopped (experimental) Called when shadow root is popped from the element.
1687type DOMShadowRootPopped struct {
1688	// HostID Host element id.
1689	HostID DOMNodeID `json:"hostId"`
1690
1691	// RootID Shadow root id.
1692	RootID DOMNodeID `json:"rootId"`
1693}
1694
1695// ProtoEvent name.
1696func (evt DOMShadowRootPopped) ProtoEvent() string {
1697	return "DOM.shadowRootPopped"
1698}
1699
1700// DOMShadowRootPushed (experimental) Called when shadow root is pushed into the element.
1701type DOMShadowRootPushed struct {
1702	// HostID Host element id.
1703	HostID DOMNodeID `json:"hostId"`
1704
1705	// Root Shadow root.
1706	Root *DOMNode `json:"root"`
1707}
1708
1709// ProtoEvent name.
1710func (evt DOMShadowRootPushed) ProtoEvent() string {
1711	return "DOM.shadowRootPushed"
1712}