Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface Protocol.CSS.CSSMedia
import { type Protocol } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts";
const { CSSMedia } = Protocol.CSS;

CSS media rule descriptor.

Properties

text: string

Media query text.

source: (
| "mediaRule"
| "importRule"
| "linkedSheet"
| "inlineSheet"
)

Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag. (CSSMediaSource enum)

optional
sourceURL: string

URL of the document containing the media query description.

optional
range: SourceRange

The associated rule (@media or @import) header range in the enclosing stylesheet (if available).

optional
styleSheetId: StyleSheetId

Identifier of the stylesheet containing this object (if exists).

optional
mediaList: MediaQuery[]

Array of media queries.