LibWeb: Notify ObservableArray observer about deletions in clear()

Another +1 WPT subtest!
This commit is contained in:
Andreas Kling 2025-04-24 14:36:34 +02:00 committed by Andreas Kling
parent cf34a7bb32
commit d33445a4ea
Notes: github-actions[bot] 2025-04-24 16:27:56 +00:00
2 changed files with 4 additions and 4 deletions

View file

@ -69,7 +69,8 @@ JS::ThrowCompletionOr<void> ObservableArray::append(JS::Value value)
void ObservableArray::clear()
{
while (!indexed_properties().is_empty()) {
indexed_properties().storage()->take_first();
auto deleted_value = indexed_properties().storage()->take_first().value;
MUST(m_on_delete_an_indexed_value->function()(deleted_value));
}
}