Ciao
i have some xHTML like this:
<!DOCTYPE html>
<html>
// [ wellformed xHTML here ]
</html>
<!-- a comment here -->`
I would get the text string inside the last comment: "a comment here". Note: it's outside main html tag.
I can log it in console trying:
var goal = document.getElementsByTagName('html')[0].parentNode.childNodes; console.log(goal);
... goal.lenght is 3, and finally goal[2] .textContent should contain the string "a comment here",
but i tried yet with .nodeValue, innerHTML etc, also converting to array, and all return undefined...