aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/range.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/range.js')
-rw-r--r--ext/fg/js/range.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/ext/fg/js/range.js b/ext/fg/js/range.js
index 0befe279..182e242c 100644
--- a/ext/fg/js/range.js
+++ b/ext/fg/js/range.js
@@ -16,19 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Polyfill caretRangeFromPoint() using the newer caretPositionFromPoint()
-if (!document.caretRangeFromPoint){
- document.caretRangeFromPoint = function polyfillcaretRangeFromPoint(x,y){
- let range = document.createRange();
- let position = document.caretPositionFromPoint(x,y);
- if (!position) {
- return null;
- }
- range.setStart(position.offsetNode, position.offset);
- range.setEnd(position.offsetNode, position.offset);
- return range;
- };
-}
class Range {
constructor(range) {