MCPcopy Index your code
hub / github.com/Bistutu/FluentRead / isInlineElement

Function isInlineElement

entrypoints/main/dom.ts:342–349  ·  view source on GitHub ↗
(node: any, tag: string)

Source from the content-addressed store, hash-verified

340
341// 检查是否为内联元素
342function isInlineElement(node: any, tag: string): boolean {
343 // 1. 判断是否在 inlineSet 中
344 // 2. 判断是否文本节点
345 // 3. 检查子元素中是否包含非内联元素
346 return inlineSet.has(tag) ||
347 node.nodeType === Node.TEXT_NODE ||
348 detectChildMeta(node);
349}
350
351// 查找可翻译的父节点
352function findTranslatableParent(node: any): any {

Callers 1

grabNodeFunction · 0.85

Calls 1

detectChildMetaFunction · 0.70

Tested by

no test coverage detected