CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute

This commit is contained in:
Manish Goregaokar 2017-01-03 11:10:12 -08:00
parent 1b0842e228
commit b4a83b6cec
12 changed files with 199 additions and 5 deletions

View 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;
};

View file

@ -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;
};

View file

@ -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;
};

View 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 {
};