title: How To Access Polymer Custom Element From Callback
body: <p>I need to access the custom element and call its method from the click event callback.</p>
  
  <pre><code>&lt;polymer-element name="my-element"&gt;
      &lt;template&gt;
          &lt;style type="text/css" media="screen"&gt;
              ...
          &lt;/style&gt;
          &lt;ul id="my_data"&gt;&lt;/ul&gt;
      &lt;/template&gt;
  
      &lt;script&gt;
          Polymer('my-element', {
              dataSelected: function(selectedText) {
                  //...
              },
  
              setData: function(data) {
                  for (var i = 0; i &lt; data.length; i++) {
                      var li = document.createElement('li');
                      li.addEventListener('click', function(e) {
                          // how can I call dataSelected() from here?
                      });
                      li.innerText = data[i];
                      this.$.my_data.appendChild(li);
                  }
              }
          });
      &lt;/script&gt;
  &lt;/polymer-element&gt;
  </code></pre>
  
  <p>How can I call the custom element's <code>dataSelected()</code> method from the callback?</p>