dperini/nwmatcher — pull request #83 by papandreou (2014-06-13 06:11:18+00:00)
Title: Tolerate a missing document.documentElement

There's a problem with the way nwmatcher is integrated into jsdom that makes `querySelectorAll` throw an error when the document does not have an `` element and thus no `document.documentElement`. It turned out that it was easy to fix in nwmatcher, so I thought I'd try that first.

If you consider this to be too much of a fringe case, I'll look into fixing it in jsdom instead. Maybe it'd be sufficient to pass a bogus object as `document.documentElement`, but I have a feeling that it'd get ugly.

See tmpvar/jsdom#330, tmpvar/jsdom#555