Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AddRuleRequest(val styleSheetId: StyleSheetId, val ruleText: String, val location: SourceRange)

Request object containing input parameters for the CSSDomain.addRule command.

Link copied to clipboard
@Serializable
data class AddRuleResponse(val rule: CSSRule)

Response type for the CSSDomain.addRule command.

Link copied to clipboard
@Serializable
data class CollectClassNamesRequest(val styleSheetId: StyleSheetId)

Request object containing input parameters for the CSSDomain.collectClassNames command.

Link copied to clipboard
@Serializable
data class CollectClassNamesResponse(val classNames: List<String>)

Response type for the CSSDomain.collectClassNames command.

Link copied to clipboard
@Serializable
data class CreateStyleSheetRequest(val frameId: FrameId)

Request object containing input parameters for the CSSDomain.createStyleSheet command.

Link copied to clipboard
@Serializable
data class CreateStyleSheetResponse(val styleSheetId: StyleSheetId)

Response type for the CSSDomain.createStyleSheet command.

Link copied to clipboard
@Serializable
data class CSSComputedStyleProperty(val name: String, val value: String)
Link copied to clipboard
@Serializable
data class CSSContainerQuery(val text: String, val range: SourceRange? = null, val styleSheetId: StyleSheetId? = null, val name: String? = null, val physicalAxes: PhysicalAxes? = null, val logicalAxes: LogicalAxes? = null)

CSS container query rule descriptor.

Link copied to clipboard
class CSSDomain

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.

Link copied to clipboard
@Serializable
data class CSSKeyframeRule(val styleSheetId: StyleSheetId? = null, val origin: StyleSheetOrigin, val keyText: Value, val style: CSSStyle)

CSS keyframe rule representation.

Link copied to clipboard
@Serializable
data class CSSKeyframesRule(val animationName: Value, val keyframes: List<CSSKeyframeRule>)

CSS keyframes rule representation.

Link copied to clipboard
@Serializable
data class CSSLayer(val text: String, val range: SourceRange? = null, val styleSheetId: StyleSheetId? = null)

CSS Layer at-rule descriptor.

Link copied to clipboard
@Serializable
data class CSSLayerData(val name: String, val subLayers: List<CSSLayerData>? = null, val order: Double)

CSS Layer data.

Link copied to clipboard
@Serializable
data class CSSMedia(val text: String, val source: CSSMediaSource, val sourceURL: String? = null, val range: SourceRange? = null, val styleSheetId: StyleSheetId? = null, val mediaList: List<MediaQuery>? = null)

CSS media rule descriptor.

Link copied to clipboard
@Serializable
enum CSSMediaSource : Enum<CSSMediaSource>

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class CSSPositionFallbackRule(val name: Value, val tryRules: List<CSSTryRule>)

CSS position-fallback rule representation.

Link copied to clipboard
@Serializable
data class CSSProperty(val name: String, val value: String, val important: Boolean? = null, val implicit: Boolean? = null, val text: String? = null, val parsedOk: Boolean? = null, val disabled: Boolean? = null, val range: SourceRange? = null, val longhandProperties: List<CSSProperty>? = null)

CSS property declaration data.

Link copied to clipboard
@Serializable
data class CSSRule(val styleSheetId: StyleSheetId? = null, val selectorList: SelectorList, val nestingSelectors: List<String>? = null, val origin: StyleSheetOrigin, val style: CSSStyle, val media: List<CSSMedia>? = null, val containerQueries: List<CSSContainerQuery>? = null, val supports: List<CSSSupports>? = null, val layers: List<CSSLayer>? = null, val scopes: List<CSSScope>? = null, val ruleTypes: List<CSSRuleType>? = null)

CSS rule representation.

Link copied to clipboard
@Serializable
enum CSSRuleType : Enum<CSSRuleType>

Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. This list only contains rule types that are collected during the ancestor rule collection.

Link copied to clipboard
@Serializable
data class CSSScope(val text: String, val range: SourceRange? = null, val styleSheetId: StyleSheetId? = null)

CSS Scope at-rule descriptor.

Link copied to clipboard
@Serializable
data class CSSStyle(val styleSheetId: StyleSheetId? = null, val cssProperties: List<CSSProperty>, val shorthandEntries: List<ShorthandEntry>, val cssText: String? = null, val range: SourceRange? = null)

CSS style representation.

Link copied to clipboard
@Serializable
data class CSSStyleSheetHeader(val styleSheetId: StyleSheetId, val frameId: FrameId, val sourceURL: String, val sourceMapURL: String? = null, val origin: StyleSheetOrigin, val title: String, val ownerNode: BackendNodeId? = null, val disabled: Boolean, val hasSourceURL: Boolean? = null, val isInline: Boolean, val isMutable: Boolean, val isConstructed: Boolean, val startLine: Double, val startColumn: Double, val length: Double, val endLine: Double, val endColumn: Double, val loadingFailed: Boolean? = null)

CSS stylesheet metainformation.

Link copied to clipboard
@Serializable
data class CSSSupports(val text: String, val active: Boolean, val range: SourceRange? = null, val styleSheetId: StyleSheetId? = null)

CSS Supports at-rule descriptor.

Link copied to clipboard
@Serializable
data class CSSTryRule(val styleSheetId: StyleSheetId? = null, val origin: StyleSheetOrigin, val style: CSSStyle)

CSS try rule representation.

Link copied to clipboard
@Serializable
object DisableResponse

A dummy response object for the CSSDomain.disable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
object EnableResponse

A dummy response object for the CSSDomain.enable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class FontFace(val fontFamily: String, val fontStyle: String, val fontVariant: String, val fontWeight: String, val fontStretch: String, val fontDisplay: String, val unicodeRange: String, val src: String, val platformFontFamily: String, val fontVariationAxes: List<FontVariationAxis>? = null)

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.

Link copied to clipboard
@Serializable
data class FontVariationAxis(val tag: String, val name: String, val minValue: Double, val maxValue: Double, val defaultValue: Double)

Information about font variation axes for variable fonts

Link copied to clipboard
@Serializable
data class ForcePseudoStateRequest(val nodeId: NodeId, val forcedPseudoClasses: List<String>)

Request object containing input parameters for the CSSDomain.forcePseudoState command.

Link copied to clipboard
@Serializable
object ForcePseudoStateResponse

A dummy response object for the CSSDomain.forcePseudoState command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class GetBackgroundColorsRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getBackgroundColors command.

Link copied to clipboard
@Serializable
data class GetBackgroundColorsResponse(val backgroundColors: List<String>? = null, val computedFontSize: String? = null, val computedFontWeight: String? = null)

Response type for the CSSDomain.getBackgroundColors command.

Link copied to clipboard
@Serializable
data class GetComputedStyleForNodeRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getComputedStyleForNode command.

Link copied to clipboard
@Serializable
data class GetComputedStyleForNodeResponse(val computedStyle: List<CSSComputedStyleProperty>)

Response type for the CSSDomain.getComputedStyleForNode command.

Link copied to clipboard
@Serializable
data class GetInlineStylesForNodeRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getInlineStylesForNode command.

Link copied to clipboard
@Serializable
data class GetInlineStylesForNodeResponse(val inlineStyle: CSSStyle? = null, val attributesStyle: CSSStyle? = null)

Response type for the CSSDomain.getInlineStylesForNode command.

Link copied to clipboard
@Serializable
data class GetLayersForNodeRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getLayersForNode command.

Link copied to clipboard
@Serializable
data class GetLayersForNodeResponse(val rootLayer: CSSLayerData)

Response type for the CSSDomain.getLayersForNode command.

Link copied to clipboard
@Serializable
data class GetMatchedStylesForNodeRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getMatchedStylesForNode command.

Link copied to clipboard
@Serializable
data class GetMatchedStylesForNodeResponse(val inlineStyle: CSSStyle? = null, val attributesStyle: CSSStyle? = null, val matchedCSSRules: List<RuleMatch>? = null, val pseudoElements: List<PseudoElementMatches>? = null, val inherited: List<InheritedStyleEntry>? = null, val inheritedPseudoElements: List<InheritedPseudoElementMatches>? = null, val cssKeyframesRules: List<CSSKeyframesRule>? = null, val cssPositionFallbackRules: List<CSSPositionFallbackRule>? = null, val parentLayoutNodeId: NodeId? = null)

Response type for the CSSDomain.getMatchedStylesForNode command.

Link copied to clipboard
@Serializable
data class GetMediaQueriesResponse(val medias: List<CSSMedia>)

Response type for the CSSDomain.getMediaQueries command.

Link copied to clipboard
@Serializable
data class GetPlatformFontsForNodeRequest(val nodeId: NodeId)

Request object containing input parameters for the CSSDomain.getPlatformFontsForNode command.

Link copied to clipboard
@Serializable
data class GetPlatformFontsForNodeResponse(val fonts: List<PlatformFontUsage>)

Response type for the CSSDomain.getPlatformFontsForNode command.

Link copied to clipboard
@Serializable
data class GetStyleSheetTextRequest(val styleSheetId: StyleSheetId)

Request object containing input parameters for the CSSDomain.getStyleSheetText command.

Link copied to clipboard
@Serializable
data class GetStyleSheetTextResponse(val text: String)

Response type for the CSSDomain.getStyleSheetText command.

Link copied to clipboard
@Serializable
data class InheritedPseudoElementMatches(val pseudoElements: List<PseudoElementMatches>)

Inherited pseudo element matches from pseudos of an ancestor node.

Link copied to clipboard
@Serializable
data class InheritedStyleEntry(val inlineStyle: CSSStyle? = null, val matchedCSSRules: List<RuleMatch>)

Inherited CSS rule collection from ancestor node.

Link copied to clipboard
@Serializable
data class MediaQuery(val expressions: List<MediaQueryExpression>, val active: Boolean)

Media query descriptor.

Link copied to clipboard
@Serializable
data class MediaQueryExpression(val value: Double, val unit: String, val feature: String, val valueRange: SourceRange? = null, val computedLength: Double? = null)

Media query expression descriptor.

Link copied to clipboard
@Serializable
data class PlatformFontUsage(val familyName: String, val isCustomFont: Boolean, val glyphCount: Double)

Information about amount of glyphs that were rendered with given font.

Link copied to clipboard
@Serializable
data class PseudoElementMatches(val pseudoType: PseudoType, val pseudoIdentifier: String? = null, val matches: List<RuleMatch>)

CSS rule collection for a single pseudo style.

Link copied to clipboard
@Serializable
data class RuleMatch(val rule: CSSRule, val matchingSelectors: List<Int>)

Match data for a CSS rule.

Link copied to clipboard
@Serializable
data class RuleUsage(val styleSheetId: StyleSheetId, val startOffset: Double, val endOffset: Double, val used: Boolean)

CSS coverage information.

Link copied to clipboard
@Serializable
data class SelectorList(val selectors: List<Value>, val text: String)

Selector list data.

Link copied to clipboard
@Serializable
data class SetContainerQueryTextRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val text: String)

Request object containing input parameters for the CSSDomain.setContainerQueryText command.

Link copied to clipboard
@Serializable
data class SetContainerQueryTextResponse(val containerQuery: CSSContainerQuery)

Response type for the CSSDomain.setContainerQueryText command.

Link copied to clipboard
@Serializable
data class SetEffectivePropertyValueForNodeRequest(val nodeId: NodeId, val propertyName: String, val value: String)

Request object containing input parameters for the CSSDomain.setEffectivePropertyValueForNode command.

Link copied to clipboard

A dummy response object for the CSSDomain.setEffectivePropertyValueForNode command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class SetKeyframeKeyRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val keyText: String)

Request object containing input parameters for the CSSDomain.setKeyframeKey command.

Link copied to clipboard
@Serializable
data class SetKeyframeKeyResponse(val keyText: Value)

Response type for the CSSDomain.setKeyframeKey command.

Link copied to clipboard
@Serializable
data class SetLocalFontsEnabledRequest(val enabled: Boolean)

Request object containing input parameters for the CSSDomain.setLocalFontsEnabled command.

Link copied to clipboard
@Serializable
object SetLocalFontsEnabledResponse

A dummy response object for the CSSDomain.setLocalFontsEnabled command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class SetMediaTextRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val text: String)

Request object containing input parameters for the CSSDomain.setMediaText command.

Link copied to clipboard
@Serializable
data class SetMediaTextResponse(val media: CSSMedia)

Response type for the CSSDomain.setMediaText command.

Link copied to clipboard
@Serializable
data class SetRuleSelectorRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val selector: String)

Request object containing input parameters for the CSSDomain.setRuleSelector command.

Link copied to clipboard
@Serializable
data class SetRuleSelectorResponse(val selectorList: SelectorList)

Response type for the CSSDomain.setRuleSelector command.

Link copied to clipboard
@Serializable
data class SetScopeTextRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val text: String)

Request object containing input parameters for the CSSDomain.setScopeText command.

Link copied to clipboard
@Serializable
data class SetScopeTextResponse(val scope: CSSScope)

Response type for the CSSDomain.setScopeText command.

Link copied to clipboard
@Serializable
data class SetStyleSheetTextRequest(val styleSheetId: StyleSheetId, val text: String)

Request object containing input parameters for the CSSDomain.setStyleSheetText command.

Link copied to clipboard
@Serializable
data class SetStyleSheetTextResponse(val sourceMapURL: String? = null)

Response type for the CSSDomain.setStyleSheetText command.

Link copied to clipboard
@Serializable
data class SetStyleTextsRequest(val edits: List<StyleDeclarationEdit>)

Request object containing input parameters for the CSSDomain.setStyleTexts command.

Link copied to clipboard
@Serializable
data class SetStyleTextsResponse(val styles: List<CSSStyle>)

Response type for the CSSDomain.setStyleTexts command.

Link copied to clipboard
@Serializable
data class SetSupportsTextRequest(val styleSheetId: StyleSheetId, val range: SourceRange, val text: String)

Request object containing input parameters for the CSSDomain.setSupportsText command.

Link copied to clipboard
@Serializable
data class SetSupportsTextResponse(val supports: CSSSupports)

Response type for the CSSDomain.setSupportsText command.

Link copied to clipboard
@Serializable
data class ShorthandEntry(val name: String, val value: String, val important: Boolean? = null)
Link copied to clipboard
@Serializable
data class SourceRange(val startLine: Int, val startColumn: Int, val endLine: Int, val endColumn: Int)

Text range within a resource. All numbers are zero-based.

Link copied to clipboard
@Serializable
data class Specificity(val a: Int, val b: Int, val c: Int)

Specificity: https://drafts.csswg.org/selectors/#specificity-rules

Link copied to clipboard
@Serializable
object StartRuleUsageTrackingResponse

A dummy response object for the CSSDomain.startRuleUsageTracking command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class StopRuleUsageTrackingResponse(val ruleUsage: List<RuleUsage>)

Response type for the CSSDomain.stopRuleUsageTracking command.

Link copied to clipboard
@Serializable
data class StyleDeclarationEdit(val styleSheetId: StyleSheetId, val range: SourceRange, val text: String)

A descriptor of operation to mutate style declaration text.

Link copied to clipboard
Link copied to clipboard
@Serializable
enum StyleSheetOrigin : Enum<StyleSheetOrigin>

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.

Link copied to clipboard
@Serializable
data class TakeComputedStyleUpdatesResponse(val nodeIds: List<NodeId>)

Response type for the CSSDomain.takeComputedStyleUpdates command.

Link copied to clipboard
@Serializable
data class TakeCoverageDeltaResponse(val coverage: List<RuleUsage>, val timestamp: Double)

Response type for the CSSDomain.takeCoverageDelta command.

Link copied to clipboard
@Serializable
data class TrackComputedStyleUpdatesRequest(val propertiesToTrack: List<CSSComputedStyleProperty>)

Request object containing input parameters for the CSSDomain.trackComputedStyleUpdates command.

Link copied to clipboard

A dummy response object for the CSSDomain.trackComputedStyleUpdates command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class Value(val text: String, val range: SourceRange? = null, val specificity: Specificity? = null)

Data for a simple selector (these are delimited by commas in a selector list).