Parse: {
    baseHref?: string;
    excludeSelectorParts?: Iterable<RegExp>;
    includeCSSLayers?: Iterable<RegExp>;
    includeSelectorPartSet?: Set<string>;
    mediaQuery?: boolean;
    urlRewrite?: boolean;
}

Optional options for StyleSheetResolve.parse.

Type declaration

  • OptionalbaseHref?: string

    This value is used as the base HREF and is used as a fallback origin for any stylesheet that lacks a defined CSSStyleSheet.href (IE inline or synthetic stylesheets). You may provide it when processing inline stylesheets when URL rewriting is necessary.

  • OptionalexcludeSelectorParts?: Iterable<RegExp>

    A list of RegExp instance used to exclude CSS selector parts from parsed stylesheet data.

  • OptionalincludeCSSLayers?: Iterable<RegExp>

    A list of RegExp instance used to specifically include in parsing for specific allowed CSS layers if present in the stylesheet.

  • OptionalincludeSelectorPartSet?: Set<string>

    A Set of strings to exactly match selector parts to include in parsed stylesheet data.

  • OptionalmediaQuery?: boolean

    When false, media query / @media parsing is disabled.

    true

  • OptionalurlRewrite?: boolean

    When false, relative URL rewriting is disabled. Relative URL rewriting based on the CSSStyleSheet.href or provided baseHref option is enabled by default.

    true