Closed tedconn closed 4 years ago
The
document
in tests always refers to the karma document, andgetElementById
doesn't penetrate that iframe where the shadow DOM is created.
We can always do iframe.contentWindow.document
, right?
If the iframe is a hassle then we can remove it for these particular tests, but it seems to me we should be able to just grab the iframe's document.
^ Merge conflicts, other than that LGTM
This PR adds
getElementById(id: string, context?: Node)
.If the provided context is not a
Document
,ShadowRoot
orHTMLDocument
it will throw a TypeErrorThis PR also increases the coverage to 100% which allows us to set the threshold for 100%! 🥳