mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
parent
b84552b89d
commit
00c3ffb7a4
5 changed files with 95 additions and 11 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue