Add support for trait-based virtual methods on Nodes, and use it for before_remove_attr and after_set_attr.

This commit is contained in:
Josh Matthews 2014-04-09 20:02:40 +02:00 committed by Ms2ger
parent ea2560ef20
commit ca6cfb5bca
9 changed files with 173 additions and 65 deletions

View file

@ -9,6 +9,7 @@ use dom::bindings::codegen::EventListenerBinding::EventListener;
use dom::event::Event;
use dom::eventdispatcher::dispatch_event;
use dom::node::NodeTypeId;
use dom::virtualmethods::VirtualMethods;
use servo_util::str::DOMString;
use collections::hashmap::HashMap;
@ -123,3 +124,9 @@ impl Reflectable for EventTarget {
&mut self.reflector_
}
}
impl VirtualMethods for JS<EventTarget> {
fn super_type(&self) -> Option<~VirtualMethods:> {
None
}
}