Unverified Commit e032469d authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #792 from hypothesis/ie11_args

Fix IE 11 JS error which annotating PDFs.
parents e102e312 a754818b
...@@ -285,7 +285,9 @@ exports.describe = (root, range, options = {}) -> ...@@ -285,7 +285,9 @@ exports.describe = (root, range, options = {}) ->
startPageIndex = getSiblingIndex(startTextLayer.parentNode) startPageIndex = getSiblingIndex(startTextLayer.parentNode)
endPageIndex = getSiblingIndex(endTextLayer.parentNode) endPageIndex = getSiblingIndex(endTextLayer.parentNode)
iter = document.createNodeIterator(startTextLayer, NodeFilter.SHOW_TEXT) # The `whatToShow`, `filter` and `expandEntityReferences` arguments are
# mandatory in IE although optional according to the spec.
iter = document.createNodeIterator(startTextLayer, NodeFilter.SHOW_TEXT, null, false);
start = seek(iter, range.start) start = seek(iter, range.start)
end = seek(iter, range.end) + start + range.end.textContent.length end = seek(iter, range.end) + start + range.end.textContent.length
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment