fixes dereferencing on an immutable reference (#31864)

This commit is contained in:
Aarya Khandelwal 2024-03-26 14:07:44 +05:30 committed by GitHub
parent 585e0d69cd
commit f7669b5238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 76 additions and 77 deletions

View file

@ -277,7 +277,7 @@ impl Event {
// Step 5.13
for object in event_path.iter().rev() {
if &**object == &*target {
if &**object == target {
self.phase.set(EventPhase::AtTarget);
} else {
self.phase.set(EventPhase::Capturing);
@ -298,7 +298,7 @@ impl Event {
// Step 5.14
for object in event_path.iter() {
let at_target = &**object == &*target;
let at_target = &**object == target;
if at_target || self.bubbles.get() {
self.phase.set(if at_target {
EventPhase::AtTarget