ladybird/Libraries/LibWeb/CSS/CSSImportRule.idl
Sam Atkins fbcaa8edde LibWeb/CSS: Make CSSImportRule.media return its own MediaList
...instead of returning the one from its associated style sheet.

This reverts 848a250b29 where I made
`CSSImportRule.media` nullable.

CSSImportRule may not have an associated style sheet, because of not
matching a supports condition, or just failing to load the URL.
Regardless of whether we do or not, the expected (non-spec) behaviour
is that we should return a MediaList always, which matches the media
queries specified on the `@import` rule.
2025-12-08 13:30:53 +00:00

13 lines
521 B
Text

#import <CSS/CSSRule.idl>
#import <CSS/CSSStyleSheet.idl>
#import <CSS/MediaList.idl>
// https://drafts.csswg.org/cssom/#the-cssimportrule-interface
[Exposed=Window]
interface CSSImportRule : CSSRule {
readonly attribute USVString href;
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
[SameObject, ImplementedAs=style_sheet_for_bindings] readonly attribute CSSStyleSheet? styleSheet;
readonly attribute CSSOMString? layerName;
readonly attribute CSSOMString? supportsText;
};