aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_bindings
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-04-15 07:05:13 -0700
committerGitHub <noreply@github.com>2025-04-15 14:05:13 +0000
commit10f6f50c615eee807ed81356501afb62f12ee6ac (patch)
tree366f8c270b93555ce738a1906ab8b3940dddebdd /components/script_bindings
parent372fd04b23665256b57ea032d0adf62e54f98d2a (diff)
downloadservo-10f6f50c615eee807ed81356501afb62f12ee6ac.tar.gz
servo-10f6f50c615eee807ed81356501afb62f12ee6ac.zip
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>
Diffstat (limited to 'components/script_bindings')
-rw-r--r--components/script_bindings/webidls/CSSStyleSheet.webidl8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script_bindings/webidls/CSSStyleSheet.webidl b/components/script_bindings/webidls/CSSStyleSheet.webidl
index 701a5637eb2..1241b5c2769 100644
--- a/components/script_bindings/webidls/CSSStyleSheet.webidl
+++ b/components/script_bindings/webidls/CSSStyleSheet.webidl
@@ -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;