mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement ParentNode.children for Document and Element
Also implement it for DocumentFragment
This commit is contained in:
parent
e332f2f0fe
commit
4c057deaf9
9 changed files with 67 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue