【问题标题】:Shadow DOM Insertion Point. Select only TextShadow DOM 插入点。仅选择文本
【发布时间】:2014-11-24 09:02:59
【问题描述】:

我没有找到任何如何只为 Shadow DOM 的插入点选择文本。

类似:

<content select="text"></content>

有这个选择器吗?

【问题讨论】:

    标签: shadow-dom


    【解决方案1】:

    根据规范:

    插入点的匹配条件是一组复合 选择器 [SELECTORS4]。这些复合选择器仅限于 只包含这些简单的选择器:

    • 类型选择器或通用选择器
    • 类选择器
    • ID 选择器
    • 属性选择器
    • 一个否定伪类,:not()

    http://www.w3.org/TR/shadow-dom/#satisfying-matching-criteria

    没有文本选择器。

    【讨论】:

      猜你喜欢
      • 2019-02-27
      • 1970-01-01
      • 2022-12-08
      • 2014-09-27
      • 2015-03-03
      • 2020-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多