You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .textContent attribute of a DocumentFragment—such as the one returned by a <template>’s .content attribute—is null.
import{parseHTML}from"linkedom";const{ document }=parseHTML("");consttemplate=document.createElement("template");template.innerHTML="foo <span>bar</span>";// in linkedom this is "foo bar", in browsers it’s an empty stringconsole.log(template.innerText);constdocumentFragment=template.content;// in linkedom this is null, in browsers it’s "foo bar"console.log(documentFragment.textContent);
The text was updated successfully, but these errors were encountered:
iacore
pushed a commit
to iacore/linkedom
that referenced
this issue
Jun 9, 2024
The
.textContent
attribute of aDocumentFragment
—such as the one returned by a<template>
’s.content
attribute—isnull
.The text was updated successfully, but these errors were encountered: