Prepend, rather than append, SVG title elements.

Fixes #8164
This commit is contained in:
Michael Howell 2015-10-31 14:38:16 -07:00
parent dc159d055c
commit 71c5d1764a
2 changed files with 4 additions and 10 deletions

View file

@ -1740,8 +1740,10 @@ impl DocumentMethods for Document {
let name = QualName::new(ns!(SVG), atom!("title"));
let elem = Element::create(name, None, self,
ElementCreator::ScriptCreated);
root.upcast::<Node>()
.AppendChild(elem.upcast())
let parent = root.upcast::<Node>();
let child = elem.upcast::<Node>();
parent
.InsertBefore(child, parent.GetFirstChild().r())
.unwrap()
}
}