mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass Atom to Attr:new for the prefix argument.
This commit is contained in:
parent
89a0c004d5
commit
e8b02acb1d
5 changed files with 13 additions and 15 deletions
|
@ -109,21 +109,21 @@ pub struct Attr {
|
|||
|
||||
impl Attr {
|
||||
fn new_inherited(local_name: Atom, value: AttrValue, name: Atom, namespace: Namespace,
|
||||
prefix: Option<DOMString>, owner: Option<JSRef<Element>>) -> Attr {
|
||||
prefix: Option<Atom>, owner: Option<JSRef<Element>>) -> Attr {
|
||||
Attr {
|
||||
reflector_: Reflector::new(),
|
||||
local_name: local_name,
|
||||
value: DOMRefCell::new(value),
|
||||
name: name,
|
||||
namespace: namespace,
|
||||
prefix: prefix.map(|p| Atom::from_slice(&p)),
|
||||
prefix: prefix,
|
||||
owner: MutNullableHeap::new(owner.map(JS::from_rooted)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(window: JSRef<Window>, local_name: Atom, value: AttrValue,
|
||||
name: Atom, namespace: Namespace,
|
||||
prefix: Option<DOMString>, owner: Option<JSRef<Element>>) -> Temporary<Attr> {
|
||||
prefix: Option<Atom>, owner: Option<JSRef<Element>>) -> Temporary<Attr> {
|
||||
reflect_dom_object(
|
||||
box Attr::new_inherited(local_name, value, name, namespace, prefix, owner),
|
||||
GlobalRef::Window(window),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue