mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 00:51:51 +00:00
LibWeb: Implement 'State-preserving atomic move integration'
This was recently added to both the HTML and DOM specifications, introducing the new moveBefore DOM API, as well as the new internal 'removing steps'. See: *432e8fb
*eaf2ac7
This commit is contained in:
parent
a47c4dbc63
commit
31a3bc3681
Notes:
github-actions[bot]
2025-04-26 14:46:43 +00:00
Author: https://github.com/shannonbooth
Commit: 31a3bc3681
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3855
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/kalenikaliaksandr
39 changed files with 1383 additions and 12 deletions
|
@ -199,14 +199,15 @@ JS::ThrowCompletionOr<void> CustomElementRegistry::define(String const& name, We
|
|||
auto& prototype = prototype_value.as_object();
|
||||
|
||||
// 3. Let lifecycleCallbacks be the ordered map «[ "connectedCallback" → null, "disconnectedCallback" → null, "adoptedCallback" → null,
|
||||
// "attributeChangedCallback" → null ]».
|
||||
// "connectedMoveCallback" → null, "attributeChangedCallback" → null ]».
|
||||
lifecycle_callbacks.set(CustomElementReactionNames::connectedCallback, {});
|
||||
lifecycle_callbacks.set(CustomElementReactionNames::disconnectedCallback, {});
|
||||
lifecycle_callbacks.set(CustomElementReactionNames::adoptedCallback, {});
|
||||
lifecycle_callbacks.set(CustomElementReactionNames::connectedMoveCallback, {});
|
||||
lifecycle_callbacks.set(CustomElementReactionNames::attributeChangedCallback, {});
|
||||
|
||||
// 4. For each callbackName of the keys of lifecycleCallbacks:
|
||||
for (auto const& callback_name : { CustomElementReactionNames::connectedCallback, CustomElementReactionNames::disconnectedCallback, CustomElementReactionNames::adoptedCallback, CustomElementReactionNames::attributeChangedCallback }) {
|
||||
for (auto const& callback_name : { CustomElementReactionNames::connectedCallback, CustomElementReactionNames::disconnectedCallback, CustomElementReactionNames::adoptedCallback, CustomElementReactionNames::connectedMoveCallback, CustomElementReactionNames::attributeChangedCallback }) {
|
||||
// 1. Let callbackValue be ? Get(prototype, callbackName).
|
||||
auto callback_value = TRY(prototype.get(callback_name));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue