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 SelectionHandler from './selection/SelectionHandler';
|
||||||
import RelationsLayer from './relations/RelationsLayer';
|
import RelationsLayer from './relations/RelationsLayer';
|
||||||
import RelationEditor from './relations/editor/RelationEditor';
|
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
|
* Pulls the strings between the annotation highlight layer
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
export const addPolyfills = () => {
|
||||||
|
|
||||||
if (!Element.prototype.matches) {
|
if (!Element.prototype.matches) {
|
||||||
Element.prototype.matches = Element.prototype.msMatchesSelector ||
|
Element.prototype.matches = Element.prototype.msMatchesSelector ||
|
||||||
Element.prototype.webkitMatchesSelector;
|
Element.prototype.webkitMatchesSelector;
|
||||||
|
@ -14,3 +16,5 @@ if (!Element.prototype.closest) {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue