Rename ToggleEventRunnable to DetailsNotificationRunnable

This commit is contained in:
Keith Yeung 2016-04-25 19:34:44 -04:00
parent c1252a40d9
commit ce302c78c1

View file

@ -74,7 +74,7 @@ impl VirtualMethods for HTMLDetailsElement {
let window = window.r();
let task_source = window.dom_manipulation_task_source();
let details = Trusted::new(self);
let runnable = box ToggleEventRunnable {
let runnable = box DetailsNotificationRunnable {
element: details,
toggle_number: counter
};
@ -83,13 +83,13 @@ impl VirtualMethods for HTMLDetailsElement {
}
}
pub struct ToggleEventRunnable {
pub struct DetailsNotificationRunnable {
element: Trusted<HTMLDetailsElement>,
toggle_number: u32
}
impl Runnable for ToggleEventRunnable {
fn handler(self: Box<ToggleEventRunnable>) {
impl Runnable for DetailsNotificationRunnable {
fn handler(self: Box<DetailsNotificationRunnable>) {
let target = self.element.root();
if target.check_toggle_count(self.toggle_number) {
target.upcast::<EventTarget>().fire_simple_event("toggle");