• Robert Knight's avatar
    Use createNodeIterator polyfill for IE 11 compatibility · 39a2991e
    Robert Knight authored
    The `seek` function from the `dom-seek` package expects its
    `NodeIterator` argument to have a `referenceNode` property, which is
    missing in IE 11.
    
    Use the dom-node-iterator package recommended by the dom-seek README [1] to
    polyfill optional-ness of arguments to `document.createNodeIterator` and
    the missing properties on the returned `NodeIterator` object.
    
    dom-node-iterator provides several ways to use the polyfill. This commit
    uses the method that prefers the browser's native implementation if possible
    and does not pollute the global scope, which could affect JS code
    outside of the Hypothesis client.
    
    There is one other place where we use `createNodeIterator` but in that
    context the missing properties are not used so the polyfill is not
    needed.
    
    Fixes #762
    
    [1] https://github.com/tilgovi/dom-seek/blob/master/README.md
    39a2991e
Name
Last commit
Last update
.github Loading commit data...
docs Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
yarn.lock Loading commit data...