mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 09:01:53 +00:00
LibWeb: Notify ObservableArray observer about deletions in clear()
Another +1 WPT subtest!
This commit is contained in:
parent
cf34a7bb32
commit
d33445a4ea
Notes:
github-actions[bot]
2025-04-24 16:27:56 +00:00
Author: https://github.com/awesomekling
Commit: d33445a4ea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4455
Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue