Why doesn't text node(spaces) come if we try to get firstChild node of HTMLhtmlElement?
In the attached image, there are some spaces between <html>
and <head>
tag and ideally firstChild Node object of html node should be text node instead of head node.
Is there any know bug?
I tried it in Chrome.
Note: spaces b/w head and body is properly reflected in dom traversal api call, for example nextSibling of head is Text node in this example.