title: Polymer - Pass dom-repeated item inside on-click function
body: <p>How do I pass a dom-repeated item inside a function in on-click? My code doesn't work:</p>
  
  <pre><code>&lt;dom-module id="my-element"&gt;
  
   &lt;template&gt;
  
     &lt;template is="dom-repeat" items="{{stuff}}&gt;
  
      &lt;paper-button on-click="_myFunction(item.name)"&gt;{{item.name}}&lt;/paper-button&gt;
  
     &lt;/template&gt;
  
   &lt;/template&gt;
  
  &lt;/dom-module&gt;
  
  &lt;script&gt;
    Polymer({
  
      is: 'my-element',
  
      ready: function() {
        this.stuff = [
          { id: 0, name: 'Red' },
          { id: 1, name: 'Blue' },
          { id: 2, name: 'Yellow' },
        ];
      },
  
      _myFunction: function(color) {
        console.log('You pressed button ' + color);
      },
  
    })
  &lt;/script&gt;
  </code></pre>
  
  <p>Or is there a better approach in achieving something like this? Thanks!</p>