mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-16 08:02:52 +00:00
LibWeb: Don't assume IO.unobserve() called on observed element
It's perfectly possible for JavaScript to call unobserve() on an element that hasn't been observed. Let's stop asserting if that happens. :^) Fixes #22020
This commit is contained in:
parent
21d9da0f3b
commit
ef809eea1e
Notes:
sideshowbarker
2024-07-17 01:23:08 +09:00
Author: https://github.com/awesomekling
Commit: ef809eea1e
Pull-request: https://github.com/SerenityOS/serenity/pull/22024
Issue: https://github.com/SerenityOS/serenity/issues/22020
3 changed files with 13 additions and 1 deletions
|
@ -0,0 +1,10 @@
|
|||
<body>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let observer = new IntersectionObserver(function() {});
|
||||
let div = document.createElement("div");
|
||||
observer.unobserve(div);
|
||||
println("PASS! (Didn't crash)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue