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.enableExperimentalEnables 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.disableExperimentalDisables the CSS agent for the given page.
CSS.getMatchedStylesForNodeExperimentalReturns requested styles for a DOM node identified by
nodeId.CSS.getInlineStylesForNodeExperimentalReturns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by
nodeId.CSS.getComputedStyleForNodeExperimentalReturns the computed style for a DOM node identified by
nodeId.CSS.getPlatformFontsForNodeExperimentalRequests information about platform fonts which we used to render child TextNodes in the given node.
CSS.getStyleSheetTextExperimentalReturns the current textual content and the URL for a stylesheet.
CSS.collectClassNamesExperimentalReturns all class names from specified stylesheet.
CSS.setStyleSheetTextExperimentalSets the new stylesheet text.
CSS.setRuleSelectorExperimentalModifies the rule selector.
CSS.setKeyframeKeyExperimentalModifies the keyframe rule key text.
CSS.setStyleTextsExperimentalApplies specified style edits one after another in the given order.
CSS.setMediaTextExperimentalModifies the rule selector.
CSS.createStyleSheetExperimentalCreates a new special "via-inspector" stylesheet in the frame with given
frameId.CSS.addRuleExperimentalInserts a new rule with the given
ruleTextin a stylesheet with givenstyleSheetId, at the position specified bylocation.CSS.forcePseudoStateExperimentalEnsures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
CSS.getMediaQueriesExperimentalReturns all media queries parsed by the rendering engine.
CSS.setEffectivePropertyValueForNodeExperimentalFind a rule with the given active property for the given node and set the new value for this property
CSS.getBackgroundColorsExperimentalCSS.startRuleUsageTrackingExperimentalEnables the selector recording.
CSS.takeCoverageDeltaExperimentalObtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
CSS.stopRuleUsageTrackingExperimentalThe list of rules with an indication of whether these were used
Events
CSS.mediaQueryResultChangedExperimentalFires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
CSS.fontsUpdatedExperimentalFires whenever a web font gets loaded.
CSS.styleSheetChangedExperimentalFired whenever a stylesheet is changed as a result of the client operation.
CSS.styleSheetAddedExperimentalFired whenever an active document stylesheet is added.
CSS.styleSheetRemovedExperimentalFired whenever an active document stylesheet is removed.
Types
StyleSheetIdExperimentalStyleSheetOriginExperimentalStylesheet 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.
PseudoElementMatchesExperimentalCSS rule collection for a single pseudo style.
InheritedStyleEntryExperimentalInherited CSS rule collection from ancestor node.
RuleMatchExperimentalMatch data for a CSS rule.
ValueExperimentalData for a simple selector (these are delimited by commas in a selector list).
SelectorListExperimentalSelector list data.
CSSStyleSheetHeaderExperimentalCSS stylesheet metainformation.
CSSRuleExperimentalCSS rule representation.
RuleUsageExperimentalCSS coverage information.
SourceRangeExperimentalText range within a resource. All numbers are zero-based.
ShorthandEntryExperimentalCSSComputedStylePropertyExperimentalCSSStyleExperimentalCSS style representation.
CSSPropertyExperimentalCSS property declaration data.
CSSMediaExperimentalCSS media rule descriptor.
MediaQueryExperimentalMedia query descriptor.
MediaQueryExpressionExperimentalMedia query expression descriptor.
PlatformFontUsageExperimentalInformation about amount of glyphs that were rendered with given font.
CSSKeyframesRuleExperimentalCSS keyframes rule representation.
CSSKeyframeRuleExperimentalCSS keyframe rule representation.
StyleDeclarationEditExperimentalA descriptor of operation to mutate style declaration text.
InlineTextBoxExperimentalDetails 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] |