I am trying to add run an external script that basically appends HTML elements to the page. I can't just use a script tag as I need it to run asynchronously, however when I use <script async src="...">
the script appends the elements to the bottom of the page, rather than the class that it's being called in.
Therefor I've created this script to append the external script tag to the page.
var x = document.createElement("SCRIPT");
x.src = '//rss.bloople.net/?url=https%3A%2F%2Fwww.coindesk.com%2Ffeed%2F&limit=5&showicon=true&type=js';
var newsContainer = document.createElement("div");
newsContainer.className = "newsContainer";
newsContainer.innerHTML = x;
document.getElementById("newsContainerId").appendChild(newsContainer);
This doesn't work however, as it appends this to the page
[object HTMLScriptElement]