Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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-polyfill

or

yarn add shadow-root-get-selection-polyfill

Usage

import { patch } from 'shadow-root-get-selection-polyfill';
patch();

About

Attempts to provide missing ShadowRoot.getSelection implementation in Firefox / Safari.

Resources

Releases

No releases published

Packages

No packages published