• 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
..
annotator Loading commit data...
boot Loading commit data...
images/icons Loading commit data...
shared Loading commit data...
sidebar Loading commit data...
styles Loading commit data...
karma.config.js Loading commit data...
tsconfig.json Loading commit data...