LibWeb: Clear active targets before invoking them

This commit is contained in:
Chase Knowlden 2024-11-19 21:01:07 -05:00
parent f09ed59351
commit 8f00e2e7f5

View file

@ -5203,11 +5203,11 @@ size_t Document::broadcast_active_resize_observations()
shallowest_target_depth = target_depth; shallowest_target_depth = target_depth;
} }
// 4. Invoke observer.[[callback]] with entries. // 4. Clear observer.[[activeTargets]].
observer->invoke_callback(entries);
// 5. Clear observer.[[activeTargets]].
observer->active_targets().clear(); observer->active_targets().clear();
// 5. Invoke observer.[[callback]] with entries.
observer->invoke_callback(entries);
} }
return shallowest_target_depth; return shallowest_target_depth;