LibWeb: Add Internals.getShadowRoot(element)

This lets you access closed shadow roots from JavaScript, even though
they're not normally accessible to JavaScript. This can be used to poke
into UA shadow roots in tests.
This commit is contained in:
Andreas Kling 2025-08-07 16:23:55 +02:00 committed by Alexander Kalenik
parent 59162342e6
commit 1402c143a9
Notes: github-actions[bot] 2025-08-07 20:17:29 +00:00
5 changed files with 22 additions and 0 deletions

View file

@ -54,4 +54,8 @@ interface Internals {
readonly attribute boolean headless;
DOMString dumpDisplayList();
// Returns the shadow root of the element, if it has one, even if it's not normally accessible to JS.
ShadowRoot? getShadowRoot(Element element);
};