Skip to main content

Module commands

Module commands 

Source

Structs§

AddRule
Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location. addRule
AddRuleParams
Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location. addRule
CollectClassNames
Returns all class names from specified stylesheet. collectClassNames
CollectClassNamesParams
Returns all class names from specified stylesheet. collectClassNames
CreateStyleSheet
Creates a new special “via-inspector” stylesheet in the frame with given frameId. createStyleSheet
CreateStyleSheetParams
Creates a new special “via-inspector” stylesheet in the frame with given frameId. createStyleSheet
Disable
Disables the CSS agent for the given page. disable
DisableParams
Disables the CSS agent for the given page. disable
Enable
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
EnableParams
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
ForcePseudoState
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. forcePseudoState
ForcePseudoStateParams
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. forcePseudoState
ForceStartingStyle
Ensures that the given node is in its starting-style state. forceStartingStyle
ForceStartingStyleParams
Ensures that the given node is in its starting-style state. forceStartingStyle
GetAnimatedStylesForNode
Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain. getAnimatedStylesForNode
GetAnimatedStylesForNodeParams
Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain. getAnimatedStylesForNode
GetBackgroundColors
GetBackgroundColorsParams
GetComputedStyleForNode
Returns the computed style for a DOM node identified by nodeId. getComputedStyleForNode
GetComputedStyleForNodeParams
Returns the computed style for a DOM node identified by nodeId. getComputedStyleForNode
GetEnvironmentVariables
Returns the values of the default UA-defined environment variables used in env() getEnvironmentVariables
GetEnvironmentVariablesParams
Returns the values of the default UA-defined environment variables used in env() getEnvironmentVariables
GetInlineStylesForNode
Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId. getInlineStylesForNode
GetInlineStylesForNodeParams
Returns the styles defined inline (explicitly in the “style” attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId. getInlineStylesForNode
GetLayersForNode
Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering. getLayersForNode
GetLayersForNodeParams
Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering. getLayersForNode
GetLocationForSelector
Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet. getLocationForSelector
GetLocationForSelectorParams
Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet. getLocationForSelector
GetLonghandProperties
GetLonghandPropertiesParams
GetMatchedStylesForNode
Returns requested styles for a DOM node identified by nodeId. getMatchedStylesForNode
GetMatchedStylesForNodeParams
Returns requested styles for a DOM node identified by nodeId. getMatchedStylesForNode
GetMediaQueries
Returns all media queries parsed by the rendering engine. getMediaQueries
GetMediaQueriesParams
Returns all media queries parsed by the rendering engine. getMediaQueries
GetPlatformFontsForNode
Requests information about platform fonts which we used to render child TextNodes in the given node. getPlatformFontsForNode
GetPlatformFontsForNodeParams
Requests information about platform fonts which we used to render child TextNodes in the given node. getPlatformFontsForNode
GetStyleSheetText
Returns the current textual content for a stylesheet. getStyleSheetText
GetStyleSheetTextParams
Returns the current textual content for a stylesheet. getStyleSheetText
ResolveValues
Resolve the specified values in the context of the provided element. For example, a value of ‘1em’ is evaluated according to the computed ‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be resolved to ‘3px’. If the propertyName was specified the values are resolved as if they were property’s declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null propertyName was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.` resolveValues
ResolveValuesParams
Resolve the specified values in the context of the provided element. For example, a value of ‘1em’ is evaluated according to the computed ‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be resolved to ‘3px’. If the propertyName was specified the values are resolved as if they were property’s declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null propertyName was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.` resolveValues
SetContainerQueryText
Modifies the expression of a container query. setContainerQueryText
SetContainerQueryTextParams
Modifies the expression of a container query. setContainerQueryText
SetEffectivePropertyValueForNode
Find a rule with the given active property for the given node and set the new value for this property setEffectivePropertyValueForNode
SetEffectivePropertyValueForNodeParams
Find a rule with the given active property for the given node and set the new value for this property setEffectivePropertyValueForNode
SetKeyframeKey
Modifies the keyframe rule key text. setKeyframeKey
SetKeyframeKeyParams
Modifies the keyframe rule key text. setKeyframeKey
SetLocalFontsEnabled
Enables/disables rendering of local CSS fonts (enabled by default). setLocalFontsEnabled
SetLocalFontsEnabledParams
Enables/disables rendering of local CSS fonts (enabled by default). setLocalFontsEnabled
SetMediaText
Modifies the rule selector. setMediaText
SetMediaTextParams
Modifies the rule selector. setMediaText
SetPropertyRulePropertyName
Modifies the property rule property name. setPropertyRulePropertyName
SetPropertyRulePropertyNameParams
Modifies the property rule property name. setPropertyRulePropertyName
SetRuleSelector
Modifies the rule selector. setRuleSelector
SetRuleSelectorParams
Modifies the rule selector. setRuleSelector
SetScopeText
Modifies the expression of a scope at-rule. setScopeText
SetScopeTextParams
Modifies the expression of a scope at-rule. setScopeText
SetStyleSheetText
Sets the new stylesheet text. setStyleSheetText
SetStyleSheetTextParams
Sets the new stylesheet text. setStyleSheetText
SetStyleTexts
Applies specified style edits one after another in the given order. setStyleTexts
SetStyleTextsParams
Applies specified style edits one after another in the given order. setStyleTexts
SetSupportsText
Modifies the expression of a supports at-rule. setSupportsText
SetSupportsTextParams
Modifies the expression of a supports at-rule. setSupportsText
StartRuleUsageTracking
Enables the selector recording. startRuleUsageTracking
StartRuleUsageTrackingParams
Enables the selector recording. startRuleUsageTracking
StopRuleUsageTracking
Stop tracking rule usage and return the list of rules that were used since last call to takeCoverageDelta (or since start of coverage instrumentation). stopRuleUsageTracking
StopRuleUsageTrackingParams
Stop tracking rule usage and return the list of rules that were used since last call to takeCoverageDelta (or since start of coverage instrumentation). stopRuleUsageTracking
TakeComputedStyleUpdates
Polls the next batch of computed style updates. takeComputedStyleUpdates
TakeComputedStyleUpdatesParams
Polls the next batch of computed style updates. takeComputedStyleUpdates
TakeCoverageDelta
Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation). takeCoverageDelta
TakeCoverageDeltaParams
Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation). takeCoverageDelta
TrackComputedStyleUpdates
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. trackComputedStyleUpdates
TrackComputedStyleUpdatesForNode
Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a computedStyleUpdated event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass undefined to disable tracking. trackComputedStyleUpdatesForNode
TrackComputedStyleUpdatesForNodeParams
Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a computedStyleUpdated event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass undefined to disable tracking. trackComputedStyleUpdatesForNode
TrackComputedStyleUpdatesParams
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. trackComputedStyleUpdates

Enums§

AddRuleMethod
CollectClassNamesMethod
CreateStyleSheetMethod
CssCommands
DisableMethod
EnableMethod
ForcePseudoStateMethod
ForceStartingStyleMethod
GetAnimatedStylesForNodeMethod
GetBackgroundColorsMethod
GetComputedStyleForNodeMethod
GetEnvironmentVariablesMethod
GetInlineStylesForNodeMethod
GetLayersForNodeMethod
GetLocationForSelectorMethod
GetLonghandPropertiesMethod
GetMatchedStylesForNodeMethod
GetMediaQueriesMethod
GetPlatformFontsForNodeMethod
GetStyleSheetTextMethod
ResolveValuesMethod
SetContainerQueryTextMethod
SetEffectivePropertyValueForNodeMethod
SetKeyframeKeyMethod
SetLocalFontsEnabledMethod
SetMediaTextMethod
SetPropertyRulePropertyNameMethod
SetRuleSelectorMethod
SetScopeTextMethod
SetStyleSheetTextMethod
SetStyleTextsMethod
SetSupportsTextMethod
StartRuleUsageTrackingMethod
StopRuleUsageTrackingMethod
TakeComputedStyleUpdatesMethod
TakeCoverageDeltaMethod
TrackComputedStyleUpdatesForNodeMethod
TrackComputedStyleUpdatesMethod