mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
7.1 KiB
7.1 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
Interfaces
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. |