@perlego-oss/text-highlighter
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -859,3 +859,3 @@ "use strict"; | ||
var endContainer = getLastDescendantTerminalNode(rootElement); | ||
var subRange = new Range(); | ||
var subRange = new rootElement.ownerDocument.defaultView.Range(); | ||
subRange.setStart(range.startContainer, range.startOffset); | ||
@@ -869,3 +869,3 @@ subRange.setEnd(endContainer, endContainer.textContent.length - 1); | ||
var _subRange = new Range(); | ||
var _subRange = new rootElement.ownerDocument.defaultView.Range(); | ||
@@ -872,0 +872,0 @@ _subRange.setStart(startContainer, 0); |
{ | ||
"name": "@perlego-oss/text-highlighter", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "TextHighlighter allows you to highlight text on web pages.", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
@@ -904,3 +904,3 @@ /** | ||
const endContainer = getLastDescendantTerminalNode(rootElement); | ||
const subRange = new Range(); | ||
const subRange = new rootElement.ownerDocument.defaultView.Range(); | ||
subRange.setStart(range.startContainer, range.startOffset); | ||
@@ -913,3 +913,3 @@ subRange.setEnd(endContainer, endContainer.textContent.length - 1); | ||
const startContainer = getFirstDescendantTerminalNode(rootElement); | ||
const subRange = new Range(); | ||
const subRange = new rootElement.ownerDocument.defaultView.Range(); | ||
subRange.setStart(startContainer, 0); | ||
@@ -916,0 +916,0 @@ subRange.setEnd(range.endContainer, range.endOffset); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5558164