CSS Experimental API

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 discover all the existing stylesheets with the getAllStyleSheets() method (or keeping track of the styleSheetAdded/styleSheetRemoved events) and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.

Common API Experimental API Not implemented

RemoteDebug Core

Chrome (CDP 1.2)

Edge

Node (V8)

Safari iOS 10.0

addRule addRule addRule
collectClassNames collectClassNames
createStyleSheet createStyleSheet createStyleSheet
disable disable disable disable
enable enable enable enable
forcePseudoState forcePseudoState forcePseudoState
getBackgroundColors getBackgroundColors
getComputedStyleForNode getComputedStyleForNode getComputedStyleForNode getComputedStyleForNode
getInlineStylesForNode getInlineStylesForNode getInlineStylesForNode getInlineStylesForNode
getMatchedStylesForNode getMatchedStylesForNode getMatchedStylesForNode getMatchedStylesForNode
getMediaQueries getMediaQueries
getPlatformFontsForNode getPlatformFontsForNode
getStyleSheetText getStyleSheetText getStyleSheetText getStyleSheetText
setEffectivePropertyValueForNode setEffectivePropertyValueForNode
setKeyframeKey setKeyframeKey
setMediaText setMediaText
setRuleSelector setRuleSelector setRuleSelector
setStyleSheetText setStyleSheetText setStyleSheetText
setStyleTexts setStyleTexts
getAllStyleSheets getAllStyleSheets
getNamedFlowCollection getNamedFlowCollection
getStyleSheet getStyleSheet
getSupportedCSSProperties getSupportedCSSProperties
getSupportedSystemFontFamilyNames getSupportedSystemFontFamilyNames
setStyleText setStyleText
startSelectorProfiler
stopSelectorProfiler

Events

RemoteDebug Core

Chrome (CDP 1.2)

Edge

Node (V8)

Safari iOS 10.0

fontsUpdated fontsUpdated
layoutEditorChange layoutEditorChange layoutEditorChange
mediaQueryResultChanged mediaQueryResultChanged mediaQueryResultChanged mediaQueryResultChanged
styleSheetAdded styleSheetAdded styleSheetAdded styleSheetAdded
styleSheetChanged styleSheetChanged styleSheetChanged styleSheetChanged
styleSheetRemoved styleSheetRemoved styleSheetRemoved styleSheetRemoved
namedFlowCreated namedFlowCreated
namedFlowRemoved namedFlowRemoved
regionOversetChanged regionOversetChanged
registeredNamedFlowContentElement registeredNamedFlowContentElement
unregisteredNamedFlowContentElement unregisteredNamedFlowContentElement
regionLayoutUpdated

Types

RemoteDebug Core

Chrome (CDP 1.2)

Edge

Node (V8)

Safari iOS 10.0

CSSComputedStyleProperty CSSComputedStyleProperty CSSComputedStyleProperty CSSComputedStyleProperty
CSSKeyframeRule CSSKeyframeRule
CSSKeyframesRule CSSKeyframesRule
CSSMedia CSSMedia CSSMedia CSSMedia
CSSProperty CSSProperty CSSProperty CSSProperty
CSSRule CSSRule CSSRule CSSRule
CSSStyle CSSStyle CSSStyle CSSStyle
CSSStyleSheetHeader CSSStyleSheetHeader CSSStyleSheetHeader CSSStyleSheetHeader
InheritedStyleEntry InheritedStyleEntry InheritedStyleEntry InheritedStyleEntry
MediaQuery MediaQuery MediaQuery
MediaQueryExpression MediaQueryExpression MediaQueryExpression
PlatformFontUsage PlatformFontUsage PlatformFontUsage
PseudoElementMatches PseudoElementMatches
RuleMatch RuleMatch RuleMatch RuleMatch
SelectorList SelectorList SelectorList SelectorList
ShorthandEntry ShorthandEntry ShorthandEntry ShorthandEntry
SourceRange SourceRange SourceRange SourceRange
StyleDeclarationEdit StyleDeclarationEdit
StyleSheetId StyleSheetId StyleSheetId StyleSheetId
StyleSheetOrigin StyleSheetOrigin StyleSheetOrigin StyleSheetOrigin
Value Value
PseudoIdMatches PseudoIdMatches PseudoIdMatches
Selector Selector
CSSPropertyInfo CSSPropertyInfo
CSSPropertyStatus CSSPropertyStatus
CSSRuleId CSSRuleId
CSSSelector CSSSelector
CSSStyleAttribute CSSStyleAttribute
CSSStyleId CSSStyleId
CSSStyleSheetBody CSSStyleSheetBody
NamedFlow NamedFlow
Region Region
SelectorProfile
SelectorProfileEntry