fgnass/domino

querySelector/querySelectorAll not available on DocumentFragment

fortes opened this issue · 4 comments

domino = require('domino');
window = domino.createWindow('');
frag = window.document.createDocumentFragment()

frag.querySelector // Undefined

Seems legit: http://www.w3.org/TR/selectors-api/ specifies that Document, DocumentFragment, and Element are supposed to have this API. Patch welcome!

Took a quick look, and looks like the lack of getElementsByTagName and a few other functions means this isn't a quick fix for someone that doesn't know the codebase like me. Perhaps when I have more time.

Ok, latest git HEAD should fix your problem. Can you check it out and close this bug if it works for you? (I added a simple test case, so it seems to work for me!)

Works for me on HEAD. Thanks for the speedy fix!