Files
tubestation/dom/webidl/CSSStyleRule.webidl
Emilio Cobos Álvarez e11ddfc877 Bug 1835062 - Make CSSStyleRule a GroupRule. r=smaug,dshin
Lazily create the rule list since most style rules won't have child
rules.

Remaining failures in the cssom tests are tracked in other bugs.

Differential Revision: https://phabricator.services.mozilla.com/D180649
2023-06-14 09:36:22 +00:00

23 lines
1.1 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*
* The origin of this IDL file is
* https://drafts.csswg.org/cssom/#the-cssstylerule-interface
*/
// https://drafts.csswg.org/cssom/#the-cssstylerule-interface
[Exposed=Window]
interface CSSStyleRule : CSSRule {
attribute UTF8String selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
// https://drafts.csswg.org/css-nesting/#cssom-style
// FIXME: Ideally CSSStyleRule should inherit from CSSGroupingRule instead,
// see https://github.com/w3c/csswg-drafts/issues/8940
[Pref="layout.css.nesting.enabled", SameObject] readonly attribute CSSRuleList cssRules;
[Pref="layout.css.nesting.enabled", Throws] unsigned long insertRule(UTF8String rule, optional unsigned long index = 0);
[Pref="layout.css.nesting.enabled", Throws] undefined deleteRule(unsigned long index);
};