diff --git a/Tests/LibWeb/Text/expected/IntersectionObserver/unobserve-element-without-matching-observe.txt b/Tests/LibWeb/Text/expected/IntersectionObserver/unobserve-element-without-matching-observe.txt new file mode 100644 index 0000000000..be36d109cd --- /dev/null +++ b/Tests/LibWeb/Text/expected/IntersectionObserver/unobserve-element-without-matching-observe.txt @@ -0,0 +1 @@ + PASS! (Didn't crash) diff --git a/Tests/LibWeb/Text/input/IntersectionObserver/unobserve-element-without-matching-observe.html b/Tests/LibWeb/Text/input/IntersectionObserver/unobserve-element-without-matching-observe.html new file mode 100644 index 0000000000..39b64052a6 --- /dev/null +++ b/Tests/LibWeb/Text/input/IntersectionObserver/unobserve-element-without-matching-observe.html @@ -0,0 +1,10 @@ +
+ + diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index e77ee1be16..7d62a0b592 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -2086,7 +2086,8 @@ void Element::register_intersection_observer(Badge