aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorMohamed Albashir <mohamedalbashir@localhost.localdomain>2016-03-18 17:32:48 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-03-31 18:17:30 -0400
commitb7a57ef4875a205254be64ae092eeedf6680d2b9 (patch)
tree03100c61e9b3aaef888bb7d1826543ac42822efc /components/script/dom/document.rs
parente551ea73226404152e02c3445f4f91e639bf66ce (diff)
downloadservo-b7a57ef4875a205254be64ae092eeedf6680d2b9.tar.gz
servo-b7a57ef4875a205254be64ae092eeedf6680d2b9.zip
Initial steps for CSSOM API
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index db565414ce1..0a148f0cb69 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -69,6 +69,7 @@ use dom::nodelist::NodeList;
use dom::processinginstruction::ProcessingInstruction;
use dom::range::Range;
use dom::servohtmlparser::{ParserRoot, ParserRef, MutNullableParserField};
+use dom::stylesheetlist::StyleSheetList;
use dom::text::Text;
use dom::touch::Touch;
use dom::touchevent::TouchEvent;
@@ -1750,6 +1751,11 @@ impl Element {
}
impl DocumentMethods for Document {
+ // https://drafts.csswg.org/cssom/#dom-document-stylesheets
+ fn StyleSheets(&self) -> Root<StyleSheetList> {
+ StyleSheetList::new(&self.window, JS::from_ref(&self))
+ }
+
// https://dom.spec.whatwg.org/#dom-document-implementation
fn Implementation(&self) -> Root<DOMImplementation> {
self.implementation.or_init(|| DOMImplementation::new(self))