Added ParentNode.querySelector skeleton

This commit is contained in:
Bruno de Oliveira Abinader 2014-06-03 14:16:49 -07:00
parent f78d04b620
commit f0aadb790d
4 changed files with 23 additions and 0 deletions

View file

@ -328,6 +328,7 @@ pub trait DocumentMethods {
fn Applets(&self) -> Temporary<HTMLCollection>;
fn Location(&self) -> Temporary<Location>;
fn Children(&self) -> Temporary<HTMLCollection>;
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>>;
fn GetOnload(&self) -> Option<EventHandlerNonNull>;
fn SetOnload(&mut self, listener: Option<EventHandlerNonNull>);
}
@ -810,6 +811,10 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
HTMLCollection::children(&*window, NodeCast::from_ref(self))
}
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>> {
Ok(None)
}
fn GetOnload(&self) -> Option<EventHandlerNonNull> {
let eventtarget: &JSRef<EventTarget> = EventTargetCast::from_ref(self);
eventtarget.get_event_handler_common("load")