[dom-bind::_createEventHandler]: listener method not defined

150 views
Skip to first unread message

nawras albaghdadi

unread,
Jul 27, 2016, 11:46:46 AM7/27/16
to Polymer
I'm trying to add event-lister on iron-ajax component but it gives error 
<template is="dom-bind" id="t">
                  <style>
                    paper-card{
                      max-width: 24%;
                    }
                  </style>
                  <style is="custom-style" include="iron-flex"></style>
                  <iron-ajax id="aj" auto
                    url="https://www.googleapis.com/youtube/v3/search?part=snippet&q=polymer&key=AIzaSyAuecFZ9xJXbGDkQYWBmYrtzOGJD-iDIgI&type=video"
                    handle-as="json"
                    last-response="{{ajaxResponse}}"
                    on-response="hanleResponse"
                    debounce-duration="300"></iron-ajax>
                    <script>
                    var t = document.querySelector('#t');
                    var aj = document.querySelector('#aj');
                    
                    </script>
          <div   class="video">
        <template is="dom-repeat" items="[[ajaxResponse.items]]" >
          <paper-card  heading="[[item.snippet.title]]" image="[[item.snippet.thumbnails.high.url]]">
            <div class="card-content">
            <p>[[item.snippet.description]]</p>
            </div>
          </paper-card>
        </template>
      </div>
    </template>
<script>
                  
                    var aj = document.querySelector('#aj');
                  
 aj.addEventListener('dataRecived',function(){
     console.log('ssss');
  })
  
                    </script> 
Reply all
Reply to author
Forward
0 new messages