Re: [webcomponents] slot element's fallback contents is never used (#317)

Just to share my own experience here: I have occasionally found uses for fallback content.

As a practical example, I'm currently working on a general-purpose dropdown combo box component. This component includes a button that can be used to invoke the dropdown. (You can view a simple work-in-progress [demo](http://basic-web-components.github.io/basic-web-components/src/basic-list-combo-box/?dom=shadow) that shows the dropdown button.)

By default, this dropdown button displays a downward-pointing arrow, but it's important for the component to allow developers to override this. E.g., in a dropdown calendar subclass, the button could show a calendar icon.

This result is achieved by supplying fallback content to the `<content>` element. (Here's the [relevant line in the component source code](https://github.com/basic-web-components/basic-web-components/blob/acb9ebe1c73ec4ad8528faf5fabee5ab3ce920ac/src/basic-combo-box/basic-combo-box.html#L120) using Polymer's syntax.) The same component source file actually has one other instance of supplying fallback content.

Again, in my experience, this sort of situation is relatively rare, but from time to time I need a component to supply default content. In those cases, it's been nice to have this supported directly by the `<content>` element. Given that experience, it may be nice to have fallback content directly supported by `<slot>`.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/317#issuecomment-140096799

Received on Monday, 14 September 2015 14:23:44 UTC