- From: Dominic Farolino <notifications@github.com>
- Date: Thu, 14 Mar 2024 06:59:15 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1261/c1997525860@github.com>
FWIW, even though much of the prior discussion about this and #808 makes it seem like WebKit doesn't implement the post-insertion steps that this PR introduces, the only reason that Blink implements this correctly is because it inherited the code from WebKit! See https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ContainerNodeAlgorithms.cpp#L54 in WebKit, where we track which elements have post-insertion steps to call later (and the equivalent Blink code), _as well as_ the and the equivalent code in Blink https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/container_node.cc;l=1095-1096;drc=54b5f6dcc0e51751aec186771b4012ef663b538b. Also see https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ContainerNode.cpp#L302-L307 in WebKit, where we _run_ each eligible element's post-insertion steps after the children change steps, and the equivalent code in Blink https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/container_node.cc;l=1071-1077;drc=9ab453c8e7d336f430c50488e8638ca802b69d80. For script execution, WebKit even [requests that post-insertion steps are used](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ScriptElement.h#L99-L104), I just don't really understand why WebKit fails tests like this then: https://wpt.fyi/results/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-button-from-div.tentative.html?label=experimental&label=master&aligned. Someone like @rniwa probably knows though. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1261#issuecomment-1997525860 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1261/c1997525860@github.com>
Received on Thursday, 14 March 2024 13:59:19 UTC