wix-style-react
Version:
wix-style-react
28 lines (22 loc) • 659 B
JavaScript
import deprecationLog from '../../utils/deprecationLog';
deprecationLog('Using "RangePolyfill.js" is deprecated. Please use the newer polyfills in "testkit/polyfills"');
if (!document.createRange) {
document.createRange = function () {
return function () {
var pub = {};
pub.setEnd = function (elem) {
pub.commonAncestorContainer = elem;
};
pub.setStart = function (elem) {
pub.commonAncestorContainer = elem;
};
pub.getBoundingClientRect = function () {
return { right: 0 };
};
pub.getClientRects = function () {
return [];
};
return pub;
}();
};
}