mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute
This commit is contained in:
parent
1b0842e228
commit
b4a83b6cec
12 changed files with 199 additions and 5 deletions
9
components/script/dom/webidls/CSSConditionRule.webidl
Normal file
9
components/script/dom/webidls/CSSConditionRule.webidl
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/css-conditional/#cssconditionrule
|
||||
[Abstract, Exposed=Window]
|
||||
interface CSSConditionRule : CSSGroupingRule {
|
||||
attribute DOMString conditionText;
|
||||
};
|
|
@ -3,7 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/cssom/#the-cssmediarule-interface
|
||||
// https://drafts.csswg.org/css-conditional/#cssmediarule
|
||||
[Exposed=Window]
|
||||
interface CSSMediaRule : CSSGroupingRule {
|
||||
interface CSSMediaRule : CSSConditionRule {
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
};
|
||||
|
|
|
@ -31,3 +31,7 @@ partial interface CSSRule {
|
|||
const unsigned short VIEWPORT_RULE = 15;
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
|
||||
partial interface CSSRule {
|
||||
const unsigned short SUPPORTS_RULE = 12;
|
||||
};
|
||||
|
|
8
components/script/dom/webidls/CSSSupportsRule.webidl
Normal file
8
components/script/dom/webidls/CSSSupportsRule.webidl
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/css-conditional/#csssupportsrule
|
||||
[Exposed=Window]
|
||||
interface CSSSupportsRule : CSSConditionRule {
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue