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>
This commit is contained in:
Oriol Brufau 2025-04-15 07:05:13 -07:00 committed by GitHub
parent 372fd04b23
commit 10f6f50c61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 127 additions and 38 deletions

View file

@ -182,11 +182,12 @@ impl HTMLLinkElement {
self.cssom_stylesheet.or_init(|| {
CSSStyleSheet::new(
&self.owner_window(),
self.upcast::<Element>(),
Some(self.upcast::<Element>()),
"text/css".into(),
None, // todo handle location
None, // todo handle title
sheet,
false, // is_constructed
can_gc,
)
})