mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb: SVG use element shadow roots should be closed, not open
This goes against the spec but matches all other browser engines.
This commit is contained in:
parent
1402c143a9
commit
42802b0785
Notes:
github-actions[bot]
2025-08-07 20:17:24 +00:00
Author: https://github.com/awesomekling
Commit: 42802b0785
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5767
3 changed files with 16 additions and 2 deletions
|
@ -36,8 +36,10 @@ void SVGUseElement::initialize(JS::Realm& realm)
|
|||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGUseElement);
|
||||
Base::initialize(realm);
|
||||
|
||||
// The shadow tree is open (inspectable by script), but read-only.
|
||||
auto shadow_root = realm.create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Open);
|
||||
// NOTE: The spec says "The shadow tree is open (inspectable by script), but read-only."
|
||||
// This doesn't actually match other browsers, and there's a spec issue to change it.
|
||||
// Spec bug: https://github.com/w3c/svgwg/issues/875
|
||||
auto shadow_root = realm.create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
|
||||
// The user agent must create a use-element shadow tree whose host is the ‘use’ element itself
|
||||
set_shadow_root(shadow_root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue