aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-05 12:57:37 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-05 12:57:37 -0700
commit76cc006a40d7242e64c6c12f033127c569914e31 (patch)
tree8d66f30f81b415b6cfc47e68a6d6e2a6297f746a /components/script/dom
parent390e1115375fc887912961baff0ad626e7192cf8 (diff)
parent82ff32a71094898454a2b9f269b1a306d5afd4a8 (diff)
downloadservo-76cc006a40d7242e64c6c12f033127c569914e31.tar.gz
servo-76cc006a40d7242e64c6c12f033127c569914e31.zip
auto merge of #3898 : Ms2ger/servo/prefix-clone, r=jdm
The current code calls as_slice() on the Option, yielding &[DOMString], and then calls to_string, yielding "[prefix]".
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/node.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 938404bdc37..c1b3ffc7980 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1516,7 +1516,7 @@ impl Node {
local: element.local_name().clone()
};
let element = Element::create(name,
- Some(element.prefix().as_slice().to_string()), *document, ScriptCreated);
+ element.prefix().as_ref().map(|p| p.as_slice().to_string()), *document, ScriptCreated);
NodeCast::from_temporary(element)
},
TextNodeTypeId => {