Interface CSSStyleSheet
interface CSSStyleSheet {
cssRules: CSSRuleList;
disabled: boolean;
href: string;
media: MediaList;
ownerNode: Element | ProcessingInstruction;
ownerRule: CSSRule;
parentStyleSheet: CSSStyleSheet;
rules: CSSRuleList;
title: string;
type: string;
addRule(selector?: string, style?: string, index?: number): number;
deleteRule(index: number): void;
insertRule(rule: string, index?: number): number;
removeRule(index?: number): void;
replace(text: string): Promise<CSSStyleSheet>;
replaceSync(text: string): void;
}
cssRules: CSSRuleList;
disabled: boolean;
href: string;
media: MediaList;
ownerNode: Element | ProcessingInstruction;
ownerRule: CSSRule;
parentStyleSheet: CSSStyleSheet;
rules: CSSRuleList;
title: string;
type: string;
addRule(selector?: string, style?: string, index?: number): number;
deleteRule(index: number): void;
insertRule(rule: string, index?: number): number;
removeRule(index?: number): void;
replace(text: string): Promise<CSSStyleSheet>;
replaceSync(text: string): void;
}
Hierarchy
- StyleSheet
- CSSStyleSheet (view full)
Index
Properties
Methods
Properties
Readonly
cssRules
disabled
disabled: boolean
Readonly
href
href: string
Readonly
media
Readonly
ownerNode
Readonly
ownerRule
Readonly
parentStyleSheet
Readonly
rules
Readonly
title
title: string
Readonly
type
type: string
Methods
addRule
deleteRule
insertRule
removeRule
replace
- replace(text): Promise<CSSStyleSheet>
Parameters
- text: string
Returns Promise<CSSStyleSheet>
A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet.
MDN Reference