Module cdp::css
[−]
[src]
[Experimental] 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.
CSS
Commands
CSS.enable
ExperimentalEnables 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.
CSS.disable
ExperimentalDisables the CSS agent for the given page.
CSS.getMatchedStylesForNode
ExperimentalReturns requested styles for a DOM node identified by
nodeId
.CSS.getInlineStylesForNode
ExperimentalReturns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by
nodeId
.CSS.getComputedStyleForNode
ExperimentalReturns the computed style for a DOM node identified by
nodeId
.CSS.getPlatformFontsForNode
ExperimentalRequests information about platform fonts which we used to render child TextNodes in the given node.
CSS.getStyleSheetText
ExperimentalReturns the current textual content and the URL for a stylesheet.
CSS.collectClassNames
ExperimentalReturns all class names from specified stylesheet.
CSS.setStyleSheetText
ExperimentalSets the new stylesheet text.
CSS.setRuleSelector
ExperimentalModifies the rule selector.
CSS.setKeyframeKey
ExperimentalModifies the keyframe rule key text.
CSS.setStyleTexts
ExperimentalApplies specified style edits one after another in the given order.
CSS.setMediaText
ExperimentalModifies the rule selector.
CSS.createStyleSheet
ExperimentalCreates a new special "via-inspector" stylesheet in the frame with given
frameId
.CSS.addRule
ExperimentalInserts a new rule with the given
ruleText
in a stylesheet with givenstyleSheetId
, at the position specified bylocation
.CSS.forcePseudoState
ExperimentalEnsures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
CSS.getMediaQueries
ExperimentalReturns all media queries parsed by the rendering engine.
CSS.setEffectivePropertyValueForNode
ExperimentalFind a rule with the given active property for the given node and set the new value for this property
CSS.getBackgroundColors
ExperimentalCSS.startRuleUsageTracking
ExperimentalEnables the selector recording.
CSS.takeCoverageDelta
ExperimentalObtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
CSS.stopRuleUsageTracking
ExperimentalThe list of rules with an indication of whether these were used
Events
CSS.mediaQueryResultChanged
ExperimentalFires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
CSS.fontsUpdated
ExperimentalFires whenever a web font gets loaded.
CSS.styleSheetChanged
ExperimentalFired whenever a stylesheet is changed as a result of the client operation.
CSS.styleSheetAdded
ExperimentalFired whenever an active document stylesheet is added.
CSS.styleSheetRemoved
ExperimentalFired whenever an active document stylesheet is removed.
Types
StyleSheetId
ExperimentalStyleSheetOrigin
ExperimentalStylesheet 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.
PseudoElementMatches
ExperimentalCSS rule collection for a single pseudo style.
InheritedStyleEntry
ExperimentalInherited CSS rule collection from ancestor node.
RuleMatch
ExperimentalMatch data for a CSS rule.
Value
ExperimentalData for a simple selector (these are delimited by commas in a selector list).
SelectorList
ExperimentalSelector list data.
CSSStyleSheetHeader
ExperimentalCSS stylesheet metainformation.
CSSRule
ExperimentalCSS rule representation.
RuleUsage
ExperimentalCSS coverage information.
SourceRange
ExperimentalText range within a resource. All numbers are zero-based.
ShorthandEntry
ExperimentalCSSComputedStyleProperty
ExperimentalCSSStyle
ExperimentalCSS style representation.
CSSProperty
ExperimentalCSS property declaration data.
CSSMedia
ExperimentalCSS media rule descriptor.
MediaQuery
ExperimentalMedia query descriptor.
MediaQueryExpression
ExperimentalMedia query expression descriptor.
PlatformFontUsage
ExperimentalInformation about amount of glyphs that were rendered with given font.
CSSKeyframesRule
ExperimentalCSS keyframes rule representation.
CSSKeyframeRule
ExperimentalCSS keyframe rule representation.
StyleDeclarationEdit
ExperimentalA descriptor of operation to mutate style declaration text.
InlineTextBox
ExperimentalDetails of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
Structs
AddRuleCommand |
[Experimental] Inserts a new rule with the given |
AddRuleResponse |
[Experimental] Inserts a new rule with the given |
CollectClassNamesCommand |
[Experimental] Returns all class names from specified stylesheet. |
CollectClassNamesResponse |
[Experimental] Returns all class names from specified stylesheet. |
CreateStyleSheetCommand |
[Experimental] Creates a new special "via-inspector" stylesheet in the frame with given |
CreateStyleSheetResponse |
[Experimental] Creates a new special "via-inspector" stylesheet in the frame with given |
CssComputedStyleProperty |
[Experimental] |
CssKeyframeRule |
[Experimental] CSS keyframe rule representation. |
CssKeyframesRule |
[Experimental] CSS keyframes rule representation. |
CssMedia |
[Experimental] CSS media rule descriptor. |
CssProperty |
[Experimental] CSS property declaration data. |
CssRule |
[Experimental] CSS rule representation. |
CssStyle |
[Experimental] CSS style representation. |
CssStyleSheetHeader |
[Experimental] CSS stylesheet metainformation. |
DisableCommand |
[Experimental] Disables the CSS agent for the given page. |
DisableResponse |
[Experimental] Disables the CSS agent for the given page. |
EnableCommand |
[Experimental] 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. |
EnableResponse |
[Experimental] 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. |
FontsUpdatedEvent |
[Experimental] Fires whenever a web font gets loaded. |
ForcePseudoStateCommand |
[Experimental] Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. |
ForcePseudoStateResponse |
[Experimental] Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. |
GetBackgroundColorsCommand |
[Experimental] |
GetBackgroundColorsResponse |
[Experimental] |
GetComputedStyleForNodeCommand |
[Experimental] Returns the computed style for a DOM node identified by |
GetComputedStyleForNodeResponse |
[Experimental] Returns the computed style for a DOM node identified by |
GetInlineStylesForNodeCommand |
[Experimental] Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by |
GetInlineStylesForNodeResponse |
[Experimental] Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by |
GetMatchedStylesForNodeCommand |
[Experimental] Returns requested styles for a DOM node identified by |
GetMatchedStylesForNodeResponse |
[Experimental] Returns requested styles for a DOM node identified by |
GetMediaQueriesCommand |
[Experimental] Returns all media queries parsed by the rendering engine. |
GetMediaQueriesResponse |
[Experimental] Returns all media queries parsed by the rendering engine. |
GetPlatformFontsForNodeCommand |
[Experimental] Requests information about platform fonts which we used to render child TextNodes in the given node. |
GetPlatformFontsForNodeResponse |
[Experimental] Requests information about platform fonts which we used to render child TextNodes in the given node. |
GetStyleSheetTextCommand |
[Experimental] Returns the current textual content and the URL for a stylesheet. |
GetStyleSheetTextResponse |
[Experimental] Returns the current textual content and the URL for a stylesheet. |
InheritedStyleEntry |
[Experimental] Inherited CSS rule collection from ancestor node. |
InlineTextBox |
[Experimental] Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions. |
MediaQuery |
[Experimental] Media query descriptor. |
MediaQueryExpression |
[Experimental] Media query expression descriptor. |
MediaQueryResultChangedEvent |
[Experimental] Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features. |
PlatformFontUsage |
[Experimental] Information about amount of glyphs that were rendered with given font. |
PseudoElementMatches |
[Experimental] CSS rule collection for a single pseudo style. |
RuleMatch |
[Experimental] Match data for a CSS rule. |
RuleUsage |
[Experimental] CSS coverage information. |
SelectorList |
[Experimental] Selector list data. |
SetEffectivePropertyValueForNodeCommand |
[Experimental] Find a rule with the given active property for the given node and set the new value for this property |
SetEffectivePropertyValueForNodeResponse |
[Experimental] Find a rule with the given active property for the given node and set the new value for this property |
SetKeyframeKeyCommand |
[Experimental] Modifies the keyframe rule key text. |
SetKeyframeKeyResponse |
[Experimental] Modifies the keyframe rule key text. |
SetMediaTextCommand |
[Experimental] Modifies the rule selector. |
SetMediaTextResponse |
[Experimental] Modifies the rule selector. |
SetRuleSelectorCommand |
[Experimental] Modifies the rule selector. |
SetRuleSelectorResponse |
[Experimental] Modifies the rule selector. |
SetStyleSheetTextCommand |
[Experimental] Sets the new stylesheet text. |
SetStyleSheetTextResponse |
[Experimental] Sets the new stylesheet text. |
SetStyleTextsCommand |
[Experimental] Applies specified style edits one after another in the given order. |
SetStyleTextsResponse |
[Experimental] Applies specified style edits one after another in the given order. |
ShorthandEntry |
[Experimental] |
SourceRange |
[Experimental] Text range within a resource. All numbers are zero-based. |
StartRuleUsageTrackingCommand |
[Experimental] Enables the selector recording. |
StartRuleUsageTrackingResponse |
[Experimental] Enables the selector recording. |
StopRuleUsageTrackingCommand |
[Experimental] The list of rules with an indication of whether these were used |
StopRuleUsageTrackingResponse |
[Experimental] The list of rules with an indication of whether these were used |
StyleDeclarationEdit |
[Experimental] A descriptor of operation to mutate style declaration text. |
StyleSheetAddedEvent |
[Experimental] Fired whenever an active document stylesheet is added. |
StyleSheetChangedEvent |
[Experimental] Fired whenever a stylesheet is changed as a result of the client operation. |
StyleSheetRemovedEvent |
[Experimental] Fired whenever an active document stylesheet is removed. |
TakeCoverageDeltaCommand |
[Experimental] Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) |
TakeCoverageDeltaResponse |
[Experimental] Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) |
Value |
[Experimental] Data for a simple selector (these are delimited by commas in a selector list). |
Enums
CssMediaSource |
[Experimental] |
ForcePseudoStateCommandForcedPseudoClasses |
[Experimental] |
StyleSheetOrigin |
[Experimental] 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 Definitions
StyleSheetId |
[Experimental] |