Skip to content

Instantly share code, notes, and snippets.

function unescapedInnerHTMLFromSelector(selector) {
return Array
.from(
document.querySelectorAll(selector)
)
.map(
function (node) {
with (document.createRange().createContextualFragment(node.outerHTML)) {
return textContent;
}