<!--
Extends core-selector to support reprojected content.

This lets you include a content element within the selector and select the
distributed nodes rather than the content element itself.

@element basic-selector
-->

<link rel="import" href="../core-selector/core-selector.html">
<link rel="import" href="../basic-element/basic-element.html">

<polymer-element name="basic-selector" extends="core-selector">
<script>
Polymer( "basic-selector", Platform.mixin( BasicWebComponents, {

  // Override the basic items property so we can handle (re)distributed content.
  // TODO: Handle selectors, etc., like base class' items can.
  get items() {
    return this.flattenChildren;
  },

  // Override the base implementation of selectedIndex to return -1 if nothing
  // is selected, which seems more helpful.
  // TODO: Handle valueattr: selected can indicate a value, not the index.
  get selectedIndex() {
    var index = this.selected;
    return index || -1;
  }
  
}));
</script>
</polymer-element>

<!--
Extends core-selector to support reprojected content.

This lets you include a content element within the selector and select the
distributed nodes rather than the content element itself.

@element basic-selector
-->

<link rel="import" href="../core-selector/core-selector.html">
<link rel="import" href="../basic-element/basic-element.html">

<polymer-element name="basic-selector" extends="core-selector">
<script>
Polymer( Platform.mixin( BasicWebComponents, {

  // Override the basic items property so we can handle (re)distributed content.
  // TODO: Handle selectors, etc., like base class' items can.
  get items() {
    return this.flattenChildren;
  },

  // Override the base implementation of selectedIndex to return -1 if nothing
  // is selected, which seems more helpful.
  // TODO: Handle valueattr: selected can indicate a value, not the index.
  get selectedIndex() {
    var index = this.selected;
    return index || -1;
  }
  
}));
</script>
</polymer-element>

Upgrade to more concise Polymer 0.4 constructor.
Upgrade to more concise Polymer 0.4 constructor.
