mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: Implement CSSStyleSheet constructor (#36521)
https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssstylesheet Testing: covered by WPT This is part of #36162 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
372fd04b23
commit
10f6f50c61
11 changed files with 127 additions and 38 deletions
|
@ -5,12 +5,20 @@
|
|||
// https://drafts.csswg.org/cssom/#the-cssstylesheet-interface
|
||||
[Exposed=Window]
|
||||
interface CSSStyleSheet : StyleSheet {
|
||||
constructor(optional CSSStyleSheetInit options = {});
|
||||
|
||||
// readonly attribute CSSRule? ownerRule;
|
||||
[Throws, SameObject] readonly attribute CSSRuleList cssRules;
|
||||
[Throws] unsigned long insertRule(DOMString rule, optional unsigned long index = 0);
|
||||
[Throws] undefined deleteRule(unsigned long index);
|
||||
};
|
||||
|
||||
dictionary CSSStyleSheetInit {
|
||||
// DOMString baseURL = null;
|
||||
(MediaList or DOMString) media;
|
||||
boolean disabled = false;
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members
|
||||
partial interface CSSStyleSheet {
|
||||
[Throws, SameObject] readonly attribute CSSRuleList rules;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue