Available on crate features
experimental and CSS and DOM and Page only.Expand description
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.
Structs§
- AddRule
Command - Inserts a new rule with the given
ruleTextin a stylesheet with givenstyleSheetId, at the position specified bylocation. - AddRule
Return - Inserts a new rule with the given
ruleTextin a stylesheet with givenstyleSheetId, at the position specified bylocation. - Collect
Class Names Command - Returns all class names from specified stylesheet.
- Collect
Class Names Return - Returns all class names from specified stylesheet.
- Create
Style Sheet Command - Creates a new special “via-inspector” stylesheet in the frame with given
frameId. - Create
Style Sheet Return - Creates a new special “via-inspector” stylesheet in the frame with given
frameId. - CssComputed
Style Property - CssKeyframe
Rule - CSS keyframe rule representation.
- CssKeyframe
Rule Builder - CssKeyframes
Rule - CSS keyframes rule representation.
- CssMedia
- CSS media rule descriptor.
- CssMedia
Builder - CssProperty
- CSS property declaration data.
- CssProperty
Builder - CssRule
- CSS rule representation.
- CssRule
Builder - CssStyle
- CSS style representation.
- CssStyle
Builder - CssStyle
Sheet Header - CSS stylesheet metainformation.
- CssStyle
Sheet Header Builder - Disable
Command - Disables the CSS agent for the given page.
- Disable
Return - Disables the CSS agent for the given page.
- Enable
Command - 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.
- Enable
Return - 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.
- Font
Face - Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.
- Font
Face Builder - Font
Variation Axis - Information about font variation axes for variable fonts
- Font
Variation Axis Builder - Fonts
Updated Event - Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font
- Force
Pseudo State Command - Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
- Force
Pseudo State Return - Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
- GetBackground
Colors Command - GetBackground
Colors Return - GetComputed
Style ForNode Command - Returns the computed style for a DOM node identified by
nodeId. - GetComputed
Style ForNode Return - Returns the computed style for a DOM node identified by
nodeId. - GetInline
Styles ForNode Command - Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM
attributes) for a DOM node identified by
nodeId. - GetInline
Styles ForNode Return - Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM
attributes) for a DOM node identified by
nodeId. - GetMatched
Styles ForNode Command - Returns requested styles for a DOM node identified by
nodeId. - GetMatched
Styles ForNode Return - Returns requested styles for a DOM node identified by
nodeId. - GetMatched
Styles ForNode Return Builder - GetMedia
Queries Command - Returns all media queries parsed by the rendering engine.
- GetMedia
Queries Return - Returns all media queries parsed by the rendering engine.
- GetPlatform
Fonts ForNode Command - Requests information about platform fonts which we used to render child TextNodes in the given node.
- GetPlatform
Fonts ForNode Return - Requests information about platform fonts which we used to render child TextNodes in the given node.
- GetStyle
Sheet Text Command - Returns the current textual content for a stylesheet.
- GetStyle
Sheet Text Return - Returns the current textual content for a stylesheet.
- Inherited
Style Entry - Inherited CSS rule collection from ancestor node.
- Media
Query - Media query descriptor.
- Media
Query Expression - Media query expression descriptor.
- Media
Query Expression Builder - Media
Query Result Changed Event - Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
- Platform
Font Usage - Information about amount of glyphs that were rendered with given font.
- Pseudo
Element Matches - CSS rule collection for a single pseudo style.
- Rule
Match - Match data for a CSS rule.
- Rule
Usage - CSS coverage information.
- Rule
Usage Builder - Selector
List - Selector list data.
- SetEffective
Property Value ForNode Command - Find a rule with the given active property for the given node and set the new value for this property
- SetEffective
Property Value ForNode Return - Find a rule with the given active property for the given node and set the new value for this property
- SetKeyframe
KeyCommand - Modifies the keyframe rule key text.
- SetKeyframe
KeyReturn - Modifies the keyframe rule key text.
- SetLocal
Fonts Enabled Command - Enables/disables rendering of local CSS fonts (enabled by default).
- SetLocal
Fonts Enabled Return - Enables/disables rendering of local CSS fonts (enabled by default).
- SetMedia
Text Command - Modifies the rule selector.
- SetMedia
Text Return - Modifies the rule selector.
- SetRule
Selector Command - Modifies the rule selector.
- SetRule
Selector Return - Modifies the rule selector.
- SetStyle
Sheet Text Command - Sets the new stylesheet text.
- SetStyle
Sheet Text Return - Sets the new stylesheet text.
- SetStyle
Texts Command - Applies specified style edits one after another in the given order.
- SetStyle
Texts Return - Applies specified style edits one after another in the given order.
- Shorthand
Entry - Source
Range - Text range within a resource. All numbers are zero-based.
- Source
Range Builder - Start
Rule Usage Tracking Command - Enables the selector recording.
- Start
Rule Usage Tracking Return - Enables the selector recording.
- Stop
Rule Usage Tracking Command - Stop tracking rule usage and return the list of rules that were used since last call to
takeCoverageDelta(or since start of coverage instrumentation) - Stop
Rule Usage Tracking Return - Stop tracking rule usage and return the list of rules that were used since last call to
takeCoverageDelta(or since start of coverage instrumentation) - Style
Declaration Edit - A descriptor of operation to mutate style declaration text.
- Style
Sheet Added Event - Fired whenever an active document stylesheet is added.
- Style
Sheet Changed Event - Fired whenever a stylesheet is changed as a result of the client operation.
- Style
Sheet Id - Style
Sheet Removed Event - Fired whenever an active document stylesheet is removed.
- Take
Computed Style Updates Command - Polls the next batch of computed style updates.
- Take
Computed Style Updates Return - Polls the next batch of computed style updates.
- Take
Coverage Delta Command - Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
- Take
Coverage Delta Return - Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
- Track
Computed Style Updates Command - Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
- Track
Computed Style Updates Return - Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
- Value
- Data for a simple selector (these are delimited by commas in a selector list).