puppeteer/new-docs/puppeteer.protocol.css.md
Maksim Sadym 62ac167339
feat(chromium): roll Chromium to r800071 (#6407)
* roll Chromium to version 86, r800071
* roll Chrome DevTools protocol version to 0.0.799653
* fix HTTPRequest.continue after
  * CDP: accept post data in the binary form in Fetch.continueRequest.
    https://chromium-review.googlesource.com/c/chromium/src/+/2315239
* update new-docs
2020-09-09 21:23:46 +02:00

7.8 KiB

Home > puppeteer > Protocol > CSS

Protocol.CSS namespace

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.

Signature:

export namespace CSS 

Enumerations

Enumeration Description
CSSMediaSource

Interfaces

Interface Description
AddRuleRequest
AddRuleResponse
CollectClassNamesRequest
CollectClassNamesResponse
CreateStyleSheetRequest
CreateStyleSheetResponse
CSSComputedStyleProperty
CSSKeyframeRule CSS keyframe rule representation.
CSSKeyframesRule CSS keyframes rule representation.
CSSMedia CSS media rule descriptor.
CSSProperty CSS property declaration data.
CSSRule CSS rule representation.
CSSStyle CSS style representation.
CSSStyleSheetHeader CSS stylesheet metainformation.
FontFace 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.
FontsUpdatedEvent Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font
FontVariationAxis Information about font variation axes for variable fonts
ForcePseudoStateRequest
GetBackgroundColorsRequest
GetBackgroundColorsResponse
GetComputedStyleForNodeRequest
GetComputedStyleForNodeResponse
GetInlineStylesForNodeRequest
GetInlineStylesForNodeResponse
GetMatchedStylesForNodeRequest
GetMatchedStylesForNodeResponse
GetMediaQueriesResponse
GetPlatformFontsForNodeRequest
GetPlatformFontsForNodeResponse
GetStyleSheetTextRequest
GetStyleSheetTextResponse
InheritedStyleEntry Inherited CSS rule collection from ancestor node.
MediaQuery Media query descriptor.
MediaQueryExpression Media query expression descriptor.
PlatformFontUsage Information about amount of glyphs that were rendered with given font.
PseudoElementMatches CSS rule collection for a single pseudo style.
RuleMatch Match data for a CSS rule.
RuleUsage CSS coverage information.
SelectorList Selector list data.
SetEffectivePropertyValueForNodeRequest
SetKeyframeKeyRequest
SetKeyframeKeyResponse
SetLocalFontsEnabledRequest
SetMediaTextRequest
SetMediaTextResponse
SetRuleSelectorRequest
SetRuleSelectorResponse
SetStyleSheetTextRequest
SetStyleSheetTextResponse
SetStyleTextsRequest
SetStyleTextsResponse
ShorthandEntry
SourceRange Text range within a resource. All numbers are zero-based.
StopRuleUsageTrackingResponse
StyleDeclarationEdit A descriptor of operation to mutate style declaration text.
StyleSheetAddedEvent Fired whenever an active document stylesheet is added.
StyleSheetChangedEvent Fired whenever a stylesheet is changed as a result of the client operation.
StyleSheetRemovedEvent Fired whenever an active document stylesheet is removed.
TakeComputedStyleUpdatesResponse
TakeCoverageDeltaResponse
TrackComputedStyleUpdatesRequest
Value Data for a simple selector (these are delimited by commas in a selector list).

Type Aliases

Type Alias Description
StyleSheetId
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.