avm2: `event.eventPhase` is enumerated from 1
This commit is contained in:
parent
87ff679898
commit
8efaed40a0
|
@ -25,9 +25,9 @@ pub enum EventPhase {
|
|||
impl Into<u32> for EventPhase {
|
||||
fn into(self) -> u32 {
|
||||
match self {
|
||||
Self::Capturing => 0,
|
||||
Self::AtTarget => 1,
|
||||
Self::Bubbling => 2,
|
||||
Self::Capturing => 1,
|
||||
Self::AtTarget => 2,
|
||||
Self::Bubbling => 3,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,10 @@ impl<'gc> TObject<'gc> for EventObject<'gc> {
|
|||
mc,
|
||||
format!(
|
||||
"[Event type=\"{}\" bubbles={} cancelable={} eventPhase={}]",
|
||||
event_type, bubbles, cancelable, phase
|
||||
event_type,
|
||||
bubbles,
|
||||
cancelable,
|
||||
phase - 1
|
||||
),
|
||||
)
|
||||
.into())
|
||||
|
|
Loading…
Reference in New Issue