Add more assertions to dispatch_event.

This commit is contained in:
Ms2ger 2015-09-16 14:48:36 +02:00
parent 76eea43c83
commit b342dff07d
2 changed files with 8 additions and 1 deletions

View file

@ -19,7 +19,7 @@ use std::default::Default;
use time;
#[derive(JSTraceable, Copy, Clone)]
#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u16)]
#[derive(HeapSizeOf)]
pub enum EventPhase {
@ -136,6 +136,11 @@ impl Event {
self.target.set(Some(JS::from_ref(val)));
}
#[inline]
pub fn phase(&self) -> EventPhase {
self.phase.get()
}
#[inline]
pub fn set_phase(&self, val: EventPhase) {
self.phase.set(val)