2022-02-15 16:10:51 -03:00
|
|
|
#import <CSS/CSSRule.idl>
|
|
|
|
|
#import <CSS/CSSRuleList.idl>
|
2024-02-24 04:46:59 -03:00
|
|
|
#import <CSS/MediaList.idl>
|
2023-11-08 15:04:56 -03:00
|
|
|
#import <CSS/StyleSheet.idl>
|
2022-02-15 16:10:51 -03:00
|
|
|
|
2022-10-07 19:45:09 -03:00
|
|
|
// https://drafts.csswg.org/cssom/#cssstylesheet
|
|
|
|
|
[Exposed=Window]
|
2021-03-08 07:22:18 -03:00
|
|
|
interface CSSStyleSheet : StyleSheet {
|
2024-02-24 04:46:59 -03:00
|
|
|
constructor(optional CSSStyleSheetInit options = {});
|
2023-10-25 12:27:19 -03:00
|
|
|
|
2024-02-24 04:46:59 -03:00
|
|
|
readonly attribute CSSRule? ownerRule;
|
2021-09-29 14:41:46 -03:00
|
|
|
[SameObject] readonly attribute CSSRuleList cssRules;
|
2021-09-29 15:28:32 -03:00
|
|
|
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
|
|
|
|
|
undefined deleteRule(unsigned long index);
|
2023-10-25 12:27:19 -03:00
|
|
|
|
2024-02-24 04:46:59 -03:00
|
|
|
Promise<CSSStyleSheet> replace(USVString text);
|
2024-02-24 04:46:59 -03:00
|
|
|
undefined replaceSync(USVString text);
|
2023-10-25 12:27:19 -03:00
|
|
|
|
|
|
|
|
// https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members
|
2024-02-24 04:46:59 -03:00
|
|
|
[SameObject, ImplementedAs=css_rules] readonly attribute CSSRuleList rules;
|
2024-02-24 04:46:59 -03:00
|
|
|
long addRule(optional DOMString selector = "undefined", optional DOMString style = "undefined", optional unsigned long index);
|
2024-02-24 04:46:59 -03:00
|
|
|
undefined removeRule(optional unsigned long index);
|
2021-03-08 07:22:18 -03:00
|
|
|
};
|
2023-10-25 12:27:19 -03:00
|
|
|
|
|
|
|
|
dictionary CSSStyleSheetInit {
|
|
|
|
|
DOMString baseURL = null;
|
|
|
|
|
(MediaList or DOMString) media = "";
|
|
|
|
|
boolean disabled = false;
|
|
|
|
|
};
|