Add a getter of 'document.head' according to HTML spec.

Add a getter and a setter of 'document.title' according to HTML spec.
Modify the test file.
This commit is contained in:
Junyoung Cho 2013-07-31 17:32:23 +09:00
parent b84552b89d
commit 00c3ffb7a4
5 changed files with 95 additions and 11 deletions

View file

@ -349,6 +349,13 @@ impl<'self, View> AbstractNode<View> {
self.transmute(f)
}
pub fn with_mut_text<R>(self, f: &fn(&mut Text) -> R) -> R {
if !self.is_text() {
fail!(~"node is not text");
}
self.transmute_mut(f)
}
pub fn is_element(self) -> bool {
match self.type_id() {
ElementNodeTypeId(*) => true,