This was originally in the spec, but got removed. It's how <details> works, it creates a <content select="summary:first-of-type">.
We should probably revisit allowing deeper hooks into distribution. Given the talk of using separate scripting contexts for custom style, layout and paint callbacks we can probably let you run code in the distribution process now too. On Tue, Feb 24, 2015 at 5:15 PM, Eric Eslinger <[email protected]> wrote: > What I want to actually accomplish is something like "if this content > isn't provided, use this default value instead". My thinking was that I > could create an element that had <div thing>Default for Thing<div> in it, > and in an enclosing webcomponent do a template that looked like > > <content select="[thing]:last-of-type"></content> > > to pick the default for thing if another <div thing> hadn't been put in > earlier in the same level of the DOM. (the light DOM is being manipulated > outside of polymer, so in some app states I'll want <div thing>foo</div> > and in some I'll want just the default. I *could* swap the thing div in and > out with some variable, but this defaulting thing seems clever. > > So specifically, if I had <my-component><div thing>foo</div><div > thing>bar</div></my-component> I want to do a content selector that picks > the last thing and just uses that- <div thing>bar</div> rendered out. > > > Follow Polymer on Google+: plus.google.com/107187849809354688692 > --- > You received this message because you are subscribed to the Google Groups > "Polymer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/CABsi40Je15XEqAYyjdKLDYie49kVhJcJ4v0CJbp2nBQaK5huSA%40mail.gmail.com > <https://groups.google.com/d/msgid/polymer-dev/CABsi40Je15XEqAYyjdKLDYie49kVhJcJ4v0CJbp2nBQaK5huSA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAPJYB1iOFt4%3DAMw%2Bn6yE6qo1bwLwYELHEjZqayrB59sz%2Bp0rkA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
