Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define getSelection on DocumentOrShadowRoot instead of Document #114

Closed
pmdartus opened this issue Nov 21, 2019 · 2 comments
Closed

Define getSelection on DocumentOrShadowRoot instead of Document #114

pmdartus opened this issue Nov 21, 2019 · 2 comments
Labels

Comments

@pmdartus
Copy link

pmdartus commented Nov 21, 2019

Currently, the Selection API spec defines the getSelection via an extension to the Document interface. In the mean time, the Shadow DOM spec defines the getSelection via an exentsion to the DocumentOrShadowRoot interface. Does it makes more sense to define getSelection in the Selection API spec via a DocumentOrShadowRoot extension instead of a Document extension?

Note: There is already a WPT tests in place to test getSelection on ShadowRoot:

@rniwa
Copy link
Contributor

rniwa commented Nov 21, 2019

See the current consensus at WICG/webcomponents#79. The plan is not add getSelection but rather add getComposedRange to Selection interface.

@rniwa
Copy link
Contributor

rniwa commented Jul 13, 2022

Closing in favor of the issue #98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants