mirror of
https://github.com/servo/servo.git
synced 2025-10-16 08:20:22 +01:00
Pass a Namespace to Element::get_attr.
This commit is contained in:
parent
e64ee3557e
commit
95913d1fed
8 changed files with 24 additions and 17 deletions
|
@ -7,6 +7,7 @@ use dom::bindings::utils::{DOMString, ErrorResult};
|
|||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLImageElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::namespace::Null;
|
||||
use dom::node::{AbstractNode, Node};
|
||||
use extra::url::Url;
|
||||
use servo_util::geometry::to_px;
|
||||
|
@ -40,7 +41,7 @@ impl HTMLImageElement {
|
|||
/// prefetching the image. This method must be called after `src` is changed.
|
||||
pub fn update_image(&mut self, image_cache: ImageCacheTask, url: Option<Url>) {
|
||||
let elem = &mut self.htmlelement.element;
|
||||
let src_opt = elem.get_attr(None, "src").map(|x| x.to_str());
|
||||
let src_opt = elem.get_attr(Null, "src").map(|x| x.to_str());
|
||||
match src_opt {
|
||||
None => {}
|
||||
Some(src) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue