[w3c/selection-api] Define getSelection on DocumentOrShadowRoot instead of Document (#114)

Currently, the Selection API spec defines the `getSelection` via an extension to the [`Document` interface](https://w3c.github.io/selection-api/#extensions-to-document-interface). In the mean time, the Shadow DOM spec defines the `getSelection` via an exentsion to the [`DocumentOrShadowRoot` interface](https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin). 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 test in place to test `getSelection` on `ShadowRoot`:
https://github.com/web-platform-tests/wpt/blob/master/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/114

Received on Thursday, 21 November 2019 05:19:09 UTC