I was following this post where basically all the answers tell you to use generateListFromArray()
. When I use this, the function is undefined and I am not able to find any documentation about it.
Here is the code I am using:
...
const dataElement = document.getElementById('data');
...
fetch(proxyurl + url)
.then(response => response.text())
.then(html => {
const parser = new DOMParser();
const documentQuery = parser.parseFromString(html, 'text/html');
// Load specifc information to the page instead of the entire document (FYI - We have received the full page anyway so it won't make this any faster).
const parsedHtml = [...documentQuery.documentElement.querySelectorAll('#list')];
// Outputs all html included on the queried page
dataElement.innerHTML = generateListFromArray(parsedHtml).innerHTML
console.log(parsedHtml[0])
}
...
<div id='data' class="container card-body"></div>