我想从自定义元素的内容中提取第一段(作为摘要)。我希望以下内容能够发挥作用:
<polymer-element name="x-thing" noscript>
<template>
<segment class="summary">
<content select="p:first-child"></content>
</segment>
<segment>
<content></content>
</segment>
</template>
</polymer-element>
不幸的是,<content select="p:first-child">
似乎与任何内容都不匹配:(
这是对应的codepen http://codepen.io/nevir/pen/CmzEB/?editors=100.
Only :not()
Shadow DOM 规范支持:http://w3c.github.io/webcomponents/spec/shadow/#dfn-matching-criteria http://w3c.github.io/webcomponents/spec/shadow/#dfn-matching-criteria
相关错误:http://crbug.com/343332 http://crbug.com/343332
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)