I am creating a node:
var node = document.createElement("div");
node.setAttribute('class', 'my-class');
node.innerHTML = "Hello World";
Then I try to console.log the node in text format.
If I use console.log(node)
I do not get string, but node (I need string!).
How can I get the whole node as string? Like this:
<div class="my-class">Hello World</div>