In my case, the DOM was complaining because I was trying to add a child in the document itself:
document.appendChild(myElement);
I solved it by getting a reference to the body tag:
document.body.appendChild(logger);
In my case, the DOM was complaining because I was trying to add a child in the document itself:
document.appendChild(myElement);
I solved it by getting a reference to the body tag:
document.body.appendChild(logger);