mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass the correct argument to Element::create when cloning.
The current code calls as_slice() on the Option, yielding &[DOMString], and then calls to_string, yielding "[prefix]".
This commit is contained in:
parent
026b5e34ea
commit
82ff32a710
3 changed files with 1 additions and 13 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue