Implement ParentNode.children for Document and Element

Also implement it for DocumentFragment
This commit is contained in:
Tom Schuster 2014-04-19 22:23:13 +02:00
parent e332f2f0fe
commit 4c057deaf9
9 changed files with 67 additions and 5 deletions

View file

@ -630,6 +630,12 @@ impl Element {
pub fn GetOuterHTML(&self, abstract_self: &JS<Element>) -> Fallible<DOMString> {
Ok(serialize(&mut NodeIterator::new(NodeCast::from(abstract_self), true, false)))
}
pub fn Children(&self, abstract_self: &JS<Element>) -> JS<HTMLCollection> {
let doc = self.node.owner_doc();
let doc = doc.get();
HTMLCollection::children(&doc.window, &NodeCast::from(abstract_self))
}
}
pub fn get_attribute_parts(name: DOMString) -> (Option<~str>, ~str) {