const text = (el => (el.innerHTML = html, el.innerText))(document.createElement('div'));
const text = new DOMParser().parseFromString(html, 'text/html').body.textContent;
const fragment = document.createRange().createContextualFragment(html);
const iter = document.createNodeIterator(fragment, NodeFilter.SHOW_TEXT);
const texts = [];
for (let n; n = iter.nextNode(); texts.push(n.nodeValue)) ;