Closed luwes closed 1 year ago
This breaks the test which was already showing the getRoot()
returns the documentElement
so it's not clear what this fixes or why it's needed.
^^ updated
OK, thanks! this looks like an unintentional bug indeed ... however, code-coverage isn't super happy now ... mind trying to understand what's going on or why something is not covered?
npx c8 report --reporter=html
this should give you a coverage/index.html
with all stats per file so you can see which one is not covered anymore or why.
it has to do with the mutation observer tests it seems
mutation-observer.js | 100 | 95 | 100 | 100 | 79-80
maybe it needs observed.getRootNode().documentElement
now?
it was passing through the ||
before, but it works as expected so we're good now ... it's up and running.
the
<html>
element is HTMLHtmlElementgetRootNode()
returnsAn object inheriting from Node. This will differ in exact form depending on where you called getRootNode(); for example:
I ran in to this bug when calling getElementById on the root node but the method didn't exist with Linkedom. Code here https://github.com/muxinc/media-chrome/blob/main/src/js/media-theme-element.js#L177-L178