mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implements StyleSheet.media
This commit is contained in:
parent
2af9648235
commit
66223f7596
18 changed files with 16 additions and 980 deletions
|
@ -9,6 +9,7 @@ use crate::dom::bindings::root::DomRoot;
|
|||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::medialist::MediaList;
|
||||
use dom_struct::dom_struct;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -51,6 +52,11 @@ impl StyleSheetMethods for StyleSheet {
|
|||
self.downcast::<CSSStyleSheet>().and_then(|s| s.get_owner())
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-stylesheet-media
|
||||
fn Media(&self) -> DomRoot<MediaList> {
|
||||
self.downcast::<CSSStyleSheet>().unwrap().medialist()
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-stylesheet-title
|
||||
fn GetTitle(&self) -> Option<DOMString> {
|
||||
self.title.clone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue