E540 webdriver: enable getting closed shadow root by PotatoCP · Pull Request #37826 · servo/servo · GitHub
[go: up one dir, main page]

Skip to content

Conversation

PotatoCP
Copy link
Contributor
@PotatoCP PotatoCP commented Jul 2, 2025

Previously, when getting element shadow root, we are using GetShadowRoot. This is a getter which only allows javascript to access shadow root with open mode.

In webdriver spec, particularly step 5, it seems that they imply for us to get the shadow root without going through the above getter.

P.S. Other browser seems to also allows getting closed shadow root, like Chromium here: https://chromium-review.googlesource.com/c/chromium/src/+/5923865.

Testing: Covered in webdriver WPT test that access closed shadow root.

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
@PotatoCP PotatoCP requested a review from gterzian as a code owner July 2, 2025 07:35
@PotatoCP
Copy link
Contributor Author
PotatoCP commented Jul 2, 2025

Copy link
Member
@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. LGTM.

@yezhizhen yezhizhen requested a review from wusyong July 2, 2025 08:21
Copy link
Contributor
@xiaochengh xiaochengh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will allow getting UA shadow roots but I guess that's fine...

@xiaochengh xiaochengh added this pull request to the merge queue Jul 2, 2025
Merged via the queue into servo:main with commit 45fb0ba Jul 2, 2025
21 checks passed
@PotatoCP PotatoCP deleted the shadow-root branch July 3, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0