Exported MS Edge polyfill
This commit is contained in:
parent
fc798b9e12
commit
4f5bab8237
|
@ -4,8 +4,9 @@ import Highlighter from './highlighter/Highlighter';
|
|||
import SelectionHandler from './selection/SelectionHandler';
|
||||
import RelationsLayer from './relations/RelationsLayer';
|
||||
import RelationEditor from './relations/editor/RelationEditor';
|
||||
import { addPolyfills } from './utils/MSEdgePolyfills';
|
||||
|
||||
import './utils/MSEdgePolyfills';
|
||||
addPolyfills(); // For Microsoft Edge
|
||||
|
||||
/**
|
||||
* Pulls the strings between the annotation highlight layer
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
export const addPolyfills = () => {
|
||||
|
||||
if (!Element.prototype.matches) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector ||
|
||||
Element.prototype.webkitMatchesSelector;
|
||||
|
@ -14,3 +16,5 @@ if (!Element.prototype.closest) {
|
|||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue