(new DOMParser()).parseFromString("<html><script type='text/javascript'/></html>", "text/xml").documentElement.firstChild instanceof HTMLElement
gives 
false
It only becomes HTMLElement when i enters the HTML dom via importNode