mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove as_slice() calls from script.
This commit is contained in:
parent
ef536372cd
commit
a862479ca8
42 changed files with 115 additions and 124 deletions
|
@ -86,16 +86,16 @@ pub fn create_element(name: QualName, prefix: Option<DOMString>,
|
|||
document: JSRef<Document>, creator: ElementCreator)
|
||||
-> Temporary<Element> {
|
||||
if name.ns != ns!(HTML) {
|
||||
return Element::new(name.local.as_slice().to_owned(), name.ns, prefix, document);
|
||||
return Element::new((*name.local).to_owned(), name.ns, prefix, document);
|
||||
}
|
||||
|
||||
macro_rules! make(
|
||||
($ctor:ident) => ({
|
||||
let obj = $ctor::new(name.local.as_slice().to_owned(), prefix, document);
|
||||
let obj = $ctor::new((*name.local).to_owned(), prefix, document);
|
||||
ElementCast::from_temporary(obj)
|
||||
});
|
||||
($ctor:ident, $($arg:expr),+) => ({
|
||||
let obj = $ctor::new(name.local.as_slice().to_owned(), prefix, document, $($arg),+);
|
||||
let obj = $ctor::new((*name.local).to_owned(), prefix, document, $($arg),+);
|
||||
ElementCast::from_temporary(obj)
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue