null textContent value for DocumentFragment
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- web-dev
调研方向
首先定位 DocumentFragment 的 textContent 实现,并将其与 issue 模板中 template.content 示例所展示的浏览器行为进行比较。当 template.content.textContent 返回 fragment 的文本而不是 null,且所展示的行为仍保持一致时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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("");
const template = document.createElement("template");
template.innerHTML = "foo <span>bar</span>";
// in linkedom this is "foo bar", in browsers it’s an empty string
console.log(template.innerText);
const documentFragment = template.content;
// in linkedom this is null, in browsers it’s "foo bar"
console.log(documentFragment.textContent);
- 主要语言
- HTML
- 星标
- 2.1k
- 派生
- 108
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
WebReflection/linkedom 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
WebReflection/linkedom#329 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 52/100
WebReflection/linkedom#327 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
WebReflection/linkedom#326 · 5 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
WebReflection/linkedom#321 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
WebReflection/linkedom#318 · 6 条评论 ·
查看 WebReflection/linkedom 的全部 Issue
相似的 Issue
-
accepted bug small
难度 2/5 1-3 小时 新手友好度 72/100
refined-github/refined-github#10133 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
lichess-org/lila#21826 ·
维护者通常 1 天内回复
-
dfm.ru未关闭N: AdGuard for Mac P4: Low T: Social Widget
难度 2/5 1-3 小时 新手友好度 65/100
AdguardTeam/AdguardFilters#242670 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复