Implement Document's 'body' attribute

Implement Document's 'body' attribute (getter and setter). Proper
implementation of setter requires Node::ReplaceChild(), which is
currently a stub and will be done on a later step.

This patch is for:
https://github.com/mozilla/servo/issues/1428
This commit is contained in:
Bruno de Oliveira Abinader 2013-12-18 17:17:43 -04:00
parent 824c7ac613
commit ce434dfb3e
5 changed files with 140 additions and 3 deletions

View file

@ -496,6 +496,10 @@ impl AbstractNode {
self.node().AppendChild(self, node)
}
pub fn ReplaceChild(self, node: AbstractNode, child: AbstractNode) -> Fallible<AbstractNode> {
self.mut_node().ReplaceChild(node, child)
}
pub fn RemoveChild(self, node: AbstractNode) -> Fallible<AbstractNode> {
self.node().RemoveChild(self, node)
}