Make Element::get_attribute() take its namespace by reference

This commit is contained in:
Anthony Ramine 2015-04-04 17:29:23 +02:00
parent dd88bcddc4
commit 254207730e
12 changed files with 33 additions and 33 deletions

View file

@ -62,8 +62,8 @@ impl<'a> ProcessDataURL for JSRef<'a, HTMLObjectElement> {
let elem: JSRef<Element> = ElementCast::from_ref(*self);
// TODO: support other values
match (elem.get_attribute(ns!(""), &atom!("type")).map(|x| x.root().r().Value()),
elem.get_attribute(ns!(""), &atom!("data")).map(|x| x.root().r().Value())) {
match (elem.get_attribute(&ns!(""), &atom!("type")).map(|x| x.root().r().Value()),
elem.get_attribute(&ns!(""), &atom!("data")).map(|x| x.root().r().Value())) {
(None, Some(uri)) => {
if is_image_data(uri.as_slice()) {
let data_url = Url::parse(uri.as_slice()).unwrap();