I have a rich editor I'm re-writing as a lit-element custom element. I'm using Firefox (latest) for testing. I'm trying to get the selection for the content editable element in the custom element's shadowDom (in a method).
In the Firefox debugger), this.shadowRoot
looks correct for the shadowRoot element, but this.shadowRoot.getSelection
is not defined,
even though DocumentOrShadowRoot
says shadowRoot.getSelection()
is the proper way to get the selection within the shadow DOM.
Can anybody shed light on something I'm missing?
Many thanks!