mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add more assertions to dispatch_event.
This commit is contained in:
parent
76eea43c83
commit
b342dff07d
2 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue