-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbrowser_protocol.pdl
5496 lines (4910 loc) · 173 KB
/
browser_protocol.pdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
version
major 1
minor 3
experimental domain Accessibility
depends on DOM
# Unique accessibility node identifier.
type AXNodeId extends string
# Enum of possible property types.
type AXValueType extends string
enum
boolean
tristate
booleanOrUndefined
idref
idrefList
integer
node
nodeList
number
string
computedString
token
tokenList
domRelation
role
internalRole
valueUndefined
# Enum of possible property sources.
type AXValueSourceType extends string
enum
attribute
implicit
style
contents
placeholder
relatedElement
# Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
type AXValueNativeSourceType extends string
enum
figcaption
label
labelfor
labelwrapped
legend
tablecaption
title
other
# A single source for a computed AX property.
type AXValueSource extends object
properties
# What type of source this is.
AXValueSourceType type
# The value of this property source.
optional AXValue value
# The name of the relevant attribute, if any.
optional string attribute
# The value of the relevant attribute, if any.
optional AXValue attributeValue
# Whether this source is superseded by a higher priority source.
optional boolean superseded
# The native markup source for this value, e.g. a <label> element.
optional AXValueNativeSourceType nativeSource
# The value, such as a node or node list, of the native source.
optional AXValue nativeSourceValue
# Whether the value for this property is invalid.
optional boolean invalid
# Reason for the value being invalid, if it is.
optional string invalidReason
type AXRelatedNode extends object
properties
# The BackendNodeId of the related DOM node.
DOM.BackendNodeId backendDOMNodeId
# The IDRef value provided, if any.
optional string idref
# The text alternative of this node in the current context.
optional string text
type AXProperty extends object
properties
# The name of this property.
AXPropertyName name
# The value of this property.
AXValue value
# A single computed AX property.
type AXValue extends object
properties
# The type of this value.
AXValueType type
# The computed value of this property.
optional any value
# One or more related nodes, if applicable.
optional array of AXRelatedNode relatedNodes
# The sources which contributed to the computation of this property.
optional array of AXValueSource sources
# Values of AXProperty name: from 'busy' to 'roledescription' - states which apply to every AX
# node, from 'live' to 'root' - attributes which apply to nodes in live regions, from
# 'autocomplete' to 'valuetext' - attributes which apply to widgets, from 'checked' to 'selected'
# - states which apply to widgets, from 'activedescendant' to 'owns' - relationships between
# elements other than parent/child/sibling.
type AXPropertyName extends string
enum
busy
disabled
hidden
hiddenRoot
invalid
keyshortcuts
roledescription
live
atomic
relevant
root
autocomplete
haspopup
level
multiselectable
orientation
multiline
readonly
required
valuemin
valuemax
valuetext
checked
expanded
modal
pressed
selected
activedescendant
controls
describedby
details
errormessage
flowto
labelledby
owns
# A node in the accessibility tree.
type AXNode extends object
properties
# Unique identifier for this node.
AXNodeId nodeId
# Whether this node is ignored for accessibility
boolean ignored
# Collection of reasons why this node is hidden.
optional array of AXProperty ignoredReasons
# This `Node`'s role, whether explicit or implicit.
optional AXValue role
# The accessible name for this `Node`.
optional AXValue name
# The accessible description for this `Node`.
optional AXValue description
# The value for this `Node`.
optional AXValue value
# All other properties
optional array of AXProperty properties
# IDs for each of this node's child nodes.
optional array of AXNodeId childIds
# The backend ID for the associated DOM node, if any.
optional DOM.BackendNodeId backendDOMNodeId
# Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
experimental command getPartialAXTree
parameters
# ID of node to get the partial accessibility tree for.
DOM.NodeId nodeId
# Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
optional boolean fetchRelatives
returns
# The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
# children, if requested.
array of AXNode nodes
experimental domain Animation
depends on Runtime
depends on DOM
# Animation instance.
type Animation extends object
properties
# `Animation`'s id.
string id
# `Animation`'s name.
string name
# `Animation`'s internal paused state.
boolean pausedState
# `Animation`'s play state.
string playState
# `Animation`'s playback rate.
number playbackRate
# `Animation`'s start time.
number startTime
# `Animation`'s current time.
number currentTime
# Animation type of `Animation`.
enum type
CSSTransition
CSSAnimation
WebAnimation
# `Animation`'s source animation node.
optional AnimationEffect source
# A unique ID for `Animation` representing the sources that triggered this CSS
# animation/transition.
optional string cssId
# AnimationEffect instance
type AnimationEffect extends object
properties
# `AnimationEffect`'s delay.
number delay
# `AnimationEffect`'s end delay.
number endDelay
# `AnimationEffect`'s iteration start.
number iterationStart
# `AnimationEffect`'s iterations.
number iterations
# `AnimationEffect`'s iteration duration.
number duration
# `AnimationEffect`'s playback direction.
string direction
# `AnimationEffect`'s fill mode.
string fill
# `AnimationEffect`'s target node.
optional DOM.BackendNodeId backendNodeId
# `AnimationEffect`'s keyframes.
optional KeyframesRule keyframesRule
# `AnimationEffect`'s timing function.
string easing
# Keyframes Rule
type KeyframesRule extends object
properties
# CSS keyframed animation's name.
optional string name
# List of animation keyframes.
array of KeyframeStyle keyframes
# Keyframe Style
type KeyframeStyle extends object
properties
# Keyframe's time offset.
string offset
# `AnimationEffect`'s timing function.
string easing
# Disables animation domain notifications.
command disable
# Enables animation domain notifications.
command enable
# Returns the current time of the an animation.
command getCurrentTime
parameters
# Id of animation.
string id
returns
# Current time of the page.
number currentTime
# Gets the playback rate of the document timeline.
command getPlaybackRate
returns
# Playback rate for animations on page.
number playbackRate
# Releases a set of animations to no longer be manipulated.
command releaseAnimations
parameters
# List of animation ids to seek.
array of string animations
# Gets the remote object of the Animation.
command resolveAnimation
parameters
# Animation id.
string animationId
returns
# Corresponding remote object.
Runtime.RemoteObject remoteObject
# Seek a set of animations to a particular time within each animation.
command seekAnimations
parameters
# List of animation ids to seek.
array of string animations
# Set the current time of each animation.
number currentTime
# Sets the paused state of a set of animations.
command setPaused
parameters
# Animations to set the pause state of.
array of string animations
# Paused state to set to.
boolean paused
# Sets the playback rate of the document timeline.
command setPlaybackRate
parameters
# Playback rate for animations on page
number playbackRate
# Sets the timing of an animation node.
command setTiming
parameters
# Animation id.
string animationId
# Duration of the animation.
number duration
# Delay of the animation.
number delay
# Event for when an animation has been cancelled.
event animationCanceled
parameters
# Id of the animation that was cancelled.
string id
# Event for each animation that has been created.
event animationCreated
parameters
# Id of the animation that was created.
string id
# Event for animation that has been started.
event animationStarted
parameters
# Animation that was started.
Animation animation
experimental domain ApplicationCache
# Detailed application cache resource information.
type ApplicationCacheResource extends object
properties
# Resource url.
string url
# Resource size.
integer size
# Resource type.
string type
# Detailed application cache information.
type ApplicationCache extends object
properties
# Manifest URL.
string manifestURL
# Application cache size.
number size
# Application cache creation time.
number creationTime
# Application cache update time.
number updateTime
# Application cache resources.
array of ApplicationCacheResource resources
# Frame identifier - manifest URL pair.
type FrameWithManifest extends object
properties
# Frame identifier.
Page.FrameId frameId
# Manifest URL.
string manifestURL
# Application cache status.
integer status
# Enables application cache domain notifications.
command enable
# Returns relevant application cache data for the document in given frame.
command getApplicationCacheForFrame
parameters
# Identifier of the frame containing document whose application cache is retrieved.
Page.FrameId frameId
returns
# Relevant application cache data for the document in given frame.
ApplicationCache applicationCache
# Returns array of frame identifiers with manifest urls for each frame containing a document
# associated with some application cache.
command getFramesWithManifests
returns
# Array of frame identifiers with manifest urls for each frame containing a document
# associated with some application cache.
array of FrameWithManifest frameIds
# Returns manifest URL for document in the given frame.
command getManifestForFrame
parameters
# Identifier of the frame containing document whose manifest is retrieved.
Page.FrameId frameId
returns
# Manifest URL for document in the given frame.
string manifestURL
event applicationCacheStatusUpdated
parameters
# Identifier of the frame containing document whose application cache updated status.
Page.FrameId frameId
# Manifest URL.
string manifestURL
# Updated application cache status.
integer status
event networkStateUpdated
parameters
boolean isNowOnline
# Audits domain allows investigation of page violations and possible improvements.
experimental domain Audits
depends on Network
# Returns the response body and size if it were re-encoded with the specified settings. Only
# applies to images.
command getEncodedResponse
parameters
# Identifier of the network request to get content for.
Network.RequestId requestId
# The encoding to use.
enum encoding
webp
jpeg
png
# The quality of the encoding (0-1). (defaults to 1)
optional number quality
# Whether to only return the size information (defaults to false).
optional boolean sizeOnly
returns
# The encoded body as a base64 string. Omitted if sizeOnly is true.
optional string body
# Size before re-encoding.
integer originalSize
# Size after re-encoding.
integer encodedSize
# The Browser domain defines methods and events for browser managing.
domain Browser
experimental type WindowID extends integer
# The state of the browser window.
experimental type WindowState extends string
enum
normal
minimized
maximized
fullscreen
# Browser window bounds information
experimental type Bounds extends object
properties
# The offset from the left edge of the screen to the window in pixels.
optional integer left
# The offset from the top edge of the screen to the window in pixels.
optional integer top
# The window width in pixels.
optional integer width
# The window height in pixels.
optional integer height
# The window state. Default to normal.
optional WindowState windowState
# Close browser gracefully.
command close
# Returns version information.
command getVersion
returns
# Protocol version.
string protocolVersion
# Product name.
string product
# Product revision.
string revision
# User-Agent.
string userAgent
# V8 version.
string jsVersion
# Get position and size of the browser window.
experimental command getWindowBounds
parameters
# Browser window id.
WindowID windowId
returns
# Bounds information of the window. When window state is 'minimized', the restored window
# position and size are returned.
Bounds bounds
# Get the browser window that contains the devtools target.
experimental command getWindowForTarget
parameters
# Devtools agent host id.
Target.TargetID targetId
returns
# Browser window id.
WindowID windowId
# Bounds information of the window. When window state is 'minimized', the restored window
# position and size are returned.
Bounds bounds
# Set position and/or size of the browser window.
experimental command setWindowBounds
parameters
# Browser window id.
WindowID windowId
# New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
# with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
Bounds bounds
# This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
# have an associated `id` used in subsequent operations on the related object. Each object type has
# a specific `id` structure, and those are not interchangeable between objects of different kinds.
# CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
# can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
# subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
experimental domain CSS
depends on DOM
type StyleSheetId extends string
# Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
# stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
# inspector" rules), "regular" for regular stylesheets.
type StyleSheetOrigin extends string
enum
injected
user-agent
inspector
regular
# CSS rule collection for a single pseudo style.
type PseudoElementMatches extends object
properties
# Pseudo element type.
DOM.PseudoType pseudoType
# Matches of CSS rules applicable to the pseudo style.
array of RuleMatch matches
# Inherited CSS rule collection from ancestor node.
type InheritedStyleEntry extends object
properties
# The ancestor node's inline style, if any, in the style inheritance chain.
optional CSSStyle inlineStyle
# Matches of CSS rules matching the ancestor node in the style inheritance chain.
array of RuleMatch matchedCSSRules
# Match data for a CSS rule.
type RuleMatch extends object
properties
# CSS rule in the match.
CSSRule rule
# Matching selector indices in the rule's selectorList selectors (0-based).
array of integer matchingSelectors
# Data for a simple selector (these are delimited by commas in a selector list).
type Value extends object
properties
# Value text.
string text
# Value range in the underlying resource (if available).
optional SourceRange range
# Selector list data.
type SelectorList extends object
properties
# Selectors in the list.
array of Value selectors
# Rule selector text.
string text
# CSS stylesheet metainformation.
type CSSStyleSheetHeader extends object
properties
# The stylesheet identifier.
StyleSheetId styleSheetId
# Owner frame identifier.
Page.FrameId frameId
# Stylesheet resource URL.
string sourceURL
# URL of source map associated with the stylesheet (if any).
optional string sourceMapURL
# Stylesheet origin.
StyleSheetOrigin origin
# Stylesheet title.
string title
# The backend id for the owner node of the stylesheet.
optional DOM.BackendNodeId ownerNode
# Denotes whether the stylesheet is disabled.
boolean disabled
# Whether the sourceURL field value comes from the sourceURL comment.
optional boolean hasSourceURL
# Whether this stylesheet is created for STYLE tag by parser. This flag is not set for
# document.written STYLE tags.
boolean isInline
# Line offset of the stylesheet within the resource (zero based).
number startLine
# Column offset of the stylesheet within the resource (zero based).
number startColumn
# Size of the content (in characters).
number length
# CSS rule representation.
type CSSRule extends object
properties
# The css style sheet identifier (absent for user agent stylesheet and user-specified
# stylesheet rules) this rule came from.
optional StyleSheetId styleSheetId
# Rule selector data.
SelectorList selectorList
# Parent stylesheet's origin.
StyleSheetOrigin origin
# Associated style declaration.
CSSStyle style
# Media list array (for rules involving media queries). The array enumerates media queries
# starting with the innermost one, going outwards.
optional array of CSSMedia media
# CSS coverage information.
type RuleUsage extends object
properties
# The css style sheet identifier (absent for user agent stylesheet and user-specified
# stylesheet rules) this rule came from.
StyleSheetId styleSheetId
# Offset of the start of the rule (including selector) from the beginning of the stylesheet.
number startOffset
# Offset of the end of the rule body from the beginning of the stylesheet.
number endOffset
# Indicates whether the rule was actually used by some element in the page.
boolean used
# Text range within a resource. All numbers are zero-based.
type SourceRange extends object
properties
# Start line of range.
integer startLine
# Start column of range (inclusive).
integer startColumn
# End line of range
integer endLine
# End column of range (exclusive).
integer endColumn
type ShorthandEntry extends object
properties
# Shorthand name.
string name
# Shorthand value.
string value
# Whether the property has "!important" annotation (implies `false` if absent).
optional boolean important
type CSSComputedStyleProperty extends object
properties
# Computed style property name.
string name
# Computed style property value.
string value
# CSS style representation.
type CSSStyle extends object
properties
# The css style sheet identifier (absent for user agent stylesheet and user-specified
# stylesheet rules) this rule came from.
optional StyleSheetId styleSheetId
# CSS properties in the style.
array of CSSProperty cssProperties
# Computed values for all shorthands found in the style.
array of ShorthandEntry shorthandEntries
# Style declaration text (if available).
optional string cssText
# Style declaration range in the enclosing stylesheet (if available).
optional SourceRange range
# CSS property declaration data.
type CSSProperty extends object
properties
# The property name.
string name
# The property value.
string value
# Whether the property has "!important" annotation (implies `false` if absent).
optional boolean important
# Whether the property is implicit (implies `false` if absent).
optional boolean implicit
# The full property text as specified in the style.
optional string text
# Whether the property is understood by the browser (implies `true` if absent).
optional boolean parsedOk
# Whether the property is disabled by the user (present for source-based properties only).
optional boolean disabled
# The entire property range in the enclosing style declaration (if available).
optional SourceRange range
# CSS media rule descriptor.
type CSSMedia extends object
properties
# Media query text.
string text
# Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if
# specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked
# stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline
# stylesheet's STYLE tag.
enum source
mediaRule
importRule
linkedSheet
inlineSheet
# URL of the document containing the media query description.
optional string sourceURL
# The associated rule (@media or @import) header range in the enclosing stylesheet (if
# available).
optional SourceRange range
# Identifier of the stylesheet containing this object (if exists).
optional StyleSheetId styleSheetId
# Array of media queries.
optional array of MediaQuery mediaList
# Media query descriptor.
type MediaQuery extends object
properties
# Array of media query expressions.
array of MediaQueryExpression expressions
# Whether the media query condition is satisfied.
boolean active
# Media query expression descriptor.
type MediaQueryExpression extends object
properties
# Media query expression value.
number value
# Media query expression units.
string unit
# Media query expression feature.
string feature
# The associated range of the value text in the enclosing stylesheet (if available).
optional SourceRange valueRange
# Computed length of media query expression (if applicable).
optional number computedLength
# Information about amount of glyphs that were rendered with given font.
type PlatformFontUsage extends object
properties
# Font's family name reported by platform.
string familyName
# Indicates if the font was downloaded or resolved locally.
boolean isCustomFont
# Amount of glyphs that were rendered with this font.
number glyphCount
# CSS keyframes rule representation.
type CSSKeyframesRule extends object
properties
# Animation name.
Value animationName
# List of keyframes.
array of CSSKeyframeRule keyframes
# CSS keyframe rule representation.
type CSSKeyframeRule extends object
properties
# The css style sheet identifier (absent for user agent stylesheet and user-specified
# stylesheet rules) this rule came from.
optional StyleSheetId styleSheetId
# Parent stylesheet's origin.
StyleSheetOrigin origin
# Associated key text.
Value keyText
# Associated style declaration.
CSSStyle style
# A descriptor of operation to mutate style declaration text.
type StyleDeclarationEdit extends object
properties
# The css style sheet identifier.
StyleSheetId styleSheetId
# The range of the style text in the enclosing stylesheet.
SourceRange range
# New style text.
string text
# Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
# position specified by `location`.
command addRule
parameters
# The css style sheet identifier where a new rule should be inserted.
StyleSheetId styleSheetId
# The text of a new rule.
string ruleText
# Text position of a new rule in the target style sheet.
SourceRange location
returns
# The newly created rule.
CSSRule rule
# Returns all class names from specified stylesheet.
command collectClassNames
parameters
StyleSheetId styleSheetId
returns
# Class name list.
array of string classNames
# Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
command createStyleSheet
parameters
# Identifier of the frame where "via-inspector" stylesheet should be created.
Page.FrameId frameId
returns
# Identifier of the created "via-inspector" stylesheet.
StyleSheetId styleSheetId
# Disables the CSS agent for the given page.
command disable
# Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
# enabled until the result of this command is received.
command enable
# Ensures that the given node will have specified pseudo-classes whenever its style is computed by
# the browser.
command forcePseudoState
parameters
# The element id for which to force the pseudo state.
DOM.NodeId nodeId
# Element pseudo classes to force when computing the element's style.
array of string forcedPseudoClasses
command getBackgroundColors
parameters
# Id of the node to get background colors for.
DOM.NodeId nodeId
returns
# The range of background colors behind this element, if it contains any visible text. If no
# visible text is present, this will be undefined. In the case of a flat background color,
# this will consist of simply that color. In the case of a gradient, this will consist of each
# of the color stops. For anything more complicated, this will be an empty array. Images will
# be ignored (as if the image had failed to load).
optional array of string backgroundColors
# The computed font size for this node, as a CSS computed value string (e.g. '12px').
optional string computedFontSize
# The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or
# '100').
optional string computedFontWeight
# The computed font size for the document body, as a computed CSS value string (e.g. '16px').
optional string computedBodyFontSize
# Returns the computed style for a DOM node identified by `nodeId`.
command getComputedStyleForNode
parameters
DOM.NodeId nodeId
returns
# Computed style for the specified DOM node.
array of CSSComputedStyleProperty computedStyle
# Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
# attributes) for a DOM node identified by `nodeId`.
command getInlineStylesForNode
parameters
DOM.NodeId nodeId
returns
# Inline style for the specified DOM node.
optional CSSStyle inlineStyle
# Attribute-defined element style (e.g. resulting from "width=20 height=100%").
optional CSSStyle attributesStyle
# Returns requested styles for a DOM node identified by `nodeId`.
command getMatchedStylesForNode
parameters
DOM.NodeId nodeId
returns
# Inline style for the specified DOM node.
optional CSSStyle inlineStyle
# Attribute-defined element style (e.g. resulting from "width=20 height=100%").
optional CSSStyle attributesStyle
# CSS rules matching this node, from all applicable stylesheets.
optional array of RuleMatch matchedCSSRules
# Pseudo style matches for this node.
optional array of PseudoElementMatches pseudoElements
# A chain of inherited styles (from the immediate node parent up to the DOM tree root).
optional array of InheritedStyleEntry inherited
# A list of CSS keyframed animations matching this node.
optional array of CSSKeyframesRule cssKeyframesRules
# Returns all media queries parsed by the rendering engine.
command getMediaQueries
returns
array of CSSMedia medias
# Requests information about platform fonts which we used to render child TextNodes in the given
# node.
command getPlatformFontsForNode
parameters
DOM.NodeId nodeId
returns
# Usage statistics for every employed platform font.
array of PlatformFontUsage fonts
# Returns the current textual content and the URL for a stylesheet.
command getStyleSheetText
parameters
StyleSheetId styleSheetId
returns
# The stylesheet text.
string text
# Find a rule with the given active property for the given node and set the new value for this
# property
command setEffectivePropertyValueForNode
parameters
# The element id for which to set property.
DOM.NodeId nodeId
string propertyName
string value
# Modifies the keyframe rule key text.
command setKeyframeKey
parameters
StyleSheetId styleSheetId
SourceRange range
string keyText
returns
# The resulting key text after modification.
Value keyText
# Modifies the rule selector.
command setMediaText
parameters
StyleSheetId styleSheetId
SourceRange range
string text
returns
# The resulting CSS media rule after modification.
CSSMedia media
# Modifies the rule selector.
command setRuleSelector
parameters
StyleSheetId styleSheetId
SourceRange range
string selector
returns
# The resulting selector list after modification.
SelectorList selectorList
# Sets the new stylesheet text.
command setStyleSheetText
parameters
StyleSheetId styleSheetId
string text
returns
# URL of source map associated with script (if any).
optional string sourceMapURL
# Applies specified style edits one after another in the given order.
command setStyleTexts
parameters
array of StyleDeclarationEdit edits
returns
# The resulting styles after modification.
array of CSSStyle styles
# Enables the selector recording.
command startRuleUsageTracking
# The list of rules with an indication of whether these were used
command stopRuleUsageTracking
returns
array of RuleUsage ruleUsage
# Obtain list of rules that became used since last call to this method (or since start of coverage
# instrumentation)
command takeCoverageDelta
returns
array of RuleUsage coverage
# Fires whenever a web font gets loaded.
event fontsUpdated
# Fires whenever a MediaQuery result changes (for example, after a browser window has been
# resized.) The current implementation considers only viewport-dependent media features.
event mediaQueryResultChanged
# Fired whenever an active document stylesheet is added.
event styleSheetAdded
parameters