aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domtokenlist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domtokenlist.rs')
-rw-r--r--components/script/dom/domtokenlist.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs
index 00f6ba1abb1..bc6c82ac6b2 100644
--- a/components/script/dom/domtokenlist.rs
+++ b/components/script/dom/domtokenlist.rs
@@ -33,7 +33,7 @@ impl DOMTokenList {
pub fn new(element: &Element, local_name: &Atom) -> Root<DOMTokenList> {
let window = window_from_node(element);
reflect_dom_object(box DOMTokenList::new_inherited(element, local_name.clone()),
- window.r(),
+ &*window,
DOMTokenListBinding::Wrap)
}
@@ -55,7 +55,6 @@ impl DOMTokenListMethods for DOMTokenList {
// https://dom.spec.whatwg.org/#dom-domtokenlist-length
fn Length(&self) -> u32 {
self.attribute().map_or(0, |attr| {
- let attr = attr.r();
attr.value().as_tokens().len()
}) as u32
}
@@ -72,7 +71,6 @@ impl DOMTokenListMethods for DOMTokenList {
fn Contains(&self, token: DOMString) -> bool {
let token = Atom::from(token);
self.attribute().map_or(false, |attr| {
- let attr = attr.r();
attr.value()
.as_tokens()
.iter()