diff options
Diffstat (limited to 'src/components/script/dom/domimplementation.rs')
-rw-r--r-- | src/components/script/dom/domimplementation.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/dom/domimplementation.rs b/src/components/script/dom/domimplementation.rs index 5a11d0119d4..71f63f52066 100644 --- a/src/components/script/dom/domimplementation.rs +++ b/src/components/script/dom/domimplementation.rs @@ -72,18 +72,18 @@ impl DOMImplementation { { // Step 3. let doc_type = DocumentType::new(~"html", None, None, &doc); - doc_node.AppendChild(&mut NodeCast::from(&doc_type)); + assert!(doc_node.AppendChild(&mut NodeCast::from(&doc_type)).is_ok()); } { // Step 4. let mut doc_html = NodeCast::from(&HTMLHtmlElement::new(~"html", &doc)); - doc_node.AppendChild(&mut doc_html); + assert!(doc_node.AppendChild(&mut doc_html).is_ok()); { // Step 5. let mut doc_head = NodeCast::from(&HTMLHeadElement::new(~"head", &doc)); - doc_html.AppendChild(&mut doc_head); + assert!(doc_html.AppendChild(&mut doc_head).is_ok()); // Step 6. match title { @@ -91,18 +91,18 @@ impl DOMImplementation { Some(title_str) => { // Step 6.1. let mut doc_title = NodeCast::from(&HTMLTitleElement::new(~"title", &doc)); - doc_head.AppendChild(&mut doc_title); + assert!(doc_head.AppendChild(&mut doc_title).is_ok()); // Step 6.2. let title_text = Text::new(title_str, &doc); - doc_title.AppendChild(&mut NodeCast::from(&title_text)); + assert!(doc_title.AppendChild(&mut NodeCast::from(&title_text)).is_ok()); } } } // Step 7. let doc_body = HTMLBodyElement::new(~"body", &doc); - doc_html.AppendChild(&mut NodeCast::from(&doc_body)); + assert!(doc_html.AppendChild(&mut NodeCast::from(&doc_body)).is_ok()); } // Step 8. |