diff --git a/Libraries/LibWeb/WebIDL/ObservableArray.cpp b/Libraries/LibWeb/WebIDL/ObservableArray.cpp index 13c76e61570..789f2ceebcc 100644 --- a/Libraries/LibWeb/WebIDL/ObservableArray.cpp +++ b/Libraries/LibWeb/WebIDL/ObservableArray.cpp @@ -69,7 +69,8 @@ JS::ThrowCompletionOr 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)); } } diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/cssom/CSSStyleSheet-constructable-invalidation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/cssom/CSSStyleSheet-constructable-invalidation.txt index b8fecef6a39..53c4124707f 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/cssom/CSSStyleSheet-constructable-invalidation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/cssom/CSSStyleSheet-constructable-invalidation.txt @@ -2,8 +2,7 @@ Harness status: OK Found 3 tests -2 Pass -1 Fail -Fail mutating constructed CSSStyleSheet applied to root invalidates styles +3 Pass +Pass mutating constructed CSSStyleSheet applied to root invalidates styles Pass mutating constructed CSSStyleSheet applied to shadowdom invalidates styles Pass mutating dependent constructed CSSStyleSheet applied to shadowdom invalidates styles \ No newline at end of file