mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
auto merge of #3856 : Ms2ger/servo/tagname, r=Manishearth
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is not intended here.
This commit is contained in:
commit
7de9ed5fc7
4 changed files with 5 additions and 24 deletions
|
@ -668,7 +668,11 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
|
|||
// http://dom.spec.whatwg.org/#dom-element-tagname
|
||||
fn TagName(self) -> DOMString {
|
||||
let qualified_name = match self.prefix {
|
||||
Some(ref prefix) => format!("{}:{}", prefix, self.local_name).into_maybe_owned(),
|
||||
Some(ref prefix) => {
|
||||
(format!("{:s}:{:s}",
|
||||
prefix.as_slice(),
|
||||
self.local_name.as_slice())).into_maybe_owned()
|
||||
},
|
||||
None => self.local_name.as_slice().into_maybe_owned()
|
||||
};
|
||||
if self.html_element_in_html_document() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue