How can I use: first-child w / shadow selector DOM <content>?
I would like to extract the first paragraph from the content of the user element (as a summary). I expect the following to work:
<polymer-element name="x-thing" noscript>
<template>
<segment class="summary">
<content select="p:first-child"></content>
</segment>
<segment>
<content></content>
</segment>
</template>
</polymer-element>
Unfortunately, <content select="p:first-child">does not match anything :(
+4
1 answer
In the specification, the Shadow DOM only supports :not(): http://w3c.imtqy.com/webcomponents/spec/shadow/#dfn-matching-criteria
Corresponding error: http://crbug.com/343332
+4