mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Add and remove MutationObservers at specified times
In the current spec, MutationObservers are explicitly added to the pending mutation observers list, and they are removed when that list is cleared in the "notify mutation observers" microtask. This solves some issues with slotchange events. As noted, we delay actually emptying the list of pending mutation observers until after we're finished with the "clone", because we can't actually copy or move the intrusive list. As far as I am aware, this should not affect behaviour because only one microtask can run at once.
This commit is contained in:
parent
37f49d5f6d
commit
6e17503423
Notes:
github-actions[bot]
2025-11-21 15:21:13 +00:00
Author: https://github.com/AtkinsSJ
Commit: 6e17503423
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6897
Reviewed-by: https://github.com/awesomekling
6 changed files with 39 additions and 34 deletions
|
|
@ -29,7 +29,7 @@ struct SimilarOriginWindowAgent : public Agent {
|
|||
|
||||
// https://dom.spec.whatwg.org/#mutation-observer-list
|
||||
// Each similar-origin window agent also has pending mutation observers (a set of zero or more MutationObserver objects), which is initially empty.
|
||||
DOM::MutationObserver::List mutation_observers;
|
||||
DOM::MutationObserver::List pending_mutation_observers;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions-stack
|
||||
// Each similar-origin window agent has a custom element reactions stack, which is initially empty.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue