1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibWeb/HTML: Ensure HTMLOrSVGElement is BC-connected when running steps

This commit is contained in:
Sam Atkins 2025-01-31 12:54:08 +00:00
parent b6fc4ec892
commit 604400f758
Notes: github-actions[bot] 2025-02-13 14:50:19 +00:00

View file

@ -94,6 +94,12 @@ void HTMLOrSVGElement<ElementBase>::inserted()
// agent must execute the following steps on the element:
DOM::Element& element = *static_cast<ElementBase*>(this);
// "A node becomes browsing-context connected when the insertion steps are invoked with it as the argument
// and it is now browsing-context connected."
// https://html.spec.whatwg.org/multipage/infrastructure.html#becomes-browsing-context-connected
if (!element.shadow_including_root().is_browsing_context_connected())
return;
// FIXME: 1. Let CSP list be element's shadow-including root's policy container's CSP list.
[[maybe_unused]] auto policy_container = element.shadow_including_root().document().policy_container();