Implement Element.removeAttribute()/removeAttributeNS().

This commit is contained in:
Tetsuharu OHZEKI 2014-01-03 03:40:05 +09:00
parent 31e2f22d20
commit 7a9ecffaa0
5 changed files with 108 additions and 5 deletions

View file

@ -67,6 +67,17 @@ impl HTMLImageElement {
}
}
pub fn AfterRemoveAttr(&mut self, name: DOMString) {
// FIXME (#1469):
// This might not handle remove src attribute actually since
// `self.update_image()` will see the missing src attribute and return early.
if "src" == name {
let document = self.htmlelement.element.node.owner_doc();
let window = document.document().window;
self.update_image(window.image_cache_task.clone(), None);
}
}
pub fn Alt(&self) -> DOMString {
~""
}