1.0.2 • Published 7 years ago
shadow-root-get-selection-polyfill v1.0.2
ShadowRoot.getSelection Polyfill
Provides missing ShadowRoot.getSelection implementation in Firefox.
The fix was sparked by an attempt to solve an issue with prosemirror in Shadow Dom and was inspired by changes made to support Shadow DOM in quilljs.
Safari hasn't moved on this for 2 years, and the GoogleChromeLabs polyfill doesn't actually address the problem.
The polyfill is likely not to work on Safari, but the patch will still be applied if the method is called.
Installation
npm install shadow-root-get-selection-polyfillor
yarn add shadow-root-get-selection-polyfillUsage
import { patch } from 'shadow-root-get-selection-polyfill';
patch();