var
parse = new DOMParser(),
d = parser.parseFromString('<?xml version="1.0"?><div class="a">Hello</div>', 'application/xhtml+xml');
console.log(d.querySelector('*'));
console.log(d.querySelector('div'));
console.log(d.querySelector('div.a'));
The initial two selectors are functioning properly
Unfortunately, the last selector with the class attribute returns null :(
Does anyone have insight into why this might be happening?
I need to query HTML results from AJAX without adding it to the main DOM.