mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Added ParentNode.querySelector skeleton
This commit is contained in:
parent
f78d04b620
commit
f0aadb790d
4 changed files with 23 additions and 0 deletions
|
@ -7,10 +7,12 @@ use dom::bindings::codegen::Bindings::DocumentFragmentBinding;
|
|||
use dom::bindings::js::{JSRef, Temporary};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
use dom::htmlcollection::HTMLCollection;
|
||||
use dom::node::{DocumentFragmentNodeTypeId, Node, window_from_node};
|
||||
use dom::window::{Window, WindowMethods};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
pub struct DocumentFragment {
|
||||
|
@ -46,6 +48,7 @@ impl DocumentFragment {
|
|||
|
||||
pub trait DocumentFragmentMethods {
|
||||
fn Children(&self) -> Temporary<HTMLCollection>;
|
||||
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>>;
|
||||
}
|
||||
|
||||
impl<'a> DocumentFragmentMethods for JSRef<'a, DocumentFragment> {
|
||||
|
@ -53,4 +56,8 @@ impl<'a> DocumentFragmentMethods for JSRef<'a, DocumentFragment> {
|
|||
let window = window_from_node(self).root();
|
||||
HTMLCollection::children(&window.root_ref(), NodeCast::from_ref(self))
|
||||
}
|
||||
|
||||
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue