avm2: Event phase should be counted from 1 in `valueOf`.

This commit is contained in:
David Wendt 2021-01-13 19:10:20 -05:00 committed by Mike Welsh
parent c4a5c6f4d3
commit 76ef0d4740
1 changed files with 1 additions and 4 deletions

View File

@ -108,10 +108,7 @@ impl<'gc> TObject<'gc> for EventObject<'gc> {
mc, mc,
format!( format!(
"[Event type=\"{}\" bubbles={} cancelable={} eventPhase={}]", "[Event type=\"{}\" bubbles={} cancelable={} eventPhase={}]",
event_type, event_type, bubbles, cancelable, phase
bubbles,
cancelable,
phase - 1
), ),
) )
.into()) .into())