mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Initial steps for CSSOM API
This commit is contained in:
parent
e551ea7322
commit
b7a57ef487
15 changed files with 159 additions and 77 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue