title: Iron Ajax - How to access Response from on-response function?
body: <p>I have this element:</p>
  
  <pre><code>&lt;template&gt;
  ...
  &lt;iron-ajax 
     id="ajax" 
     url="..." 
     handle-as="json" 
     verbose=true 
     last-response={{ajaxResponse}} 
     loading="{{cargando}}"
     on-response="_handleResponse"&gt; 
  &lt;/iron-ajax&gt;
  
  &lt;div id="resultado"&gt;&lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      Polymer({
          ...
  
          _handleResponse: function(event){
              console.log("_handleResponse... ");
              // this.$.resultado.innerHTML = event.detail.innerHTML;
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>The response I see in Firebug is: </p>
  
  <pre><code>&lt;p&gt;Hello word&lt;/p&gt;
  </code></pre>
  
  <p>I want to access the response in <code>_handleResponse</code> function in order to set it as <code>innerHTML</code> of the <code>resultado</code> div, but nothing works.</p>
  
  <p>I have tried:</p>
  
  <ul>
  <li><code>event.detail.innerHTML</code></li>
  <li><code>event.detail.response</code></li>
  <li><code>event.detail.xhr.response</code></li>
  <li><code>event.detail.xhr.responseText</code></li>
  <li><code>event.detail.request.xhr.response</code> (This route doesn't exist. How can it be the solution in <a href="https://stackoverflow.com/questions/35220177/polymer-iron-ajax-how-to-access-response-from-request-after-error-event">Polymer Iron Ajax - How to access Response from Request after Error Event?</a>?)</li>
  </ul>
  
  <p>If I debug and watch e.detail.response value when in on-response function:</p>
  
  <p><a href="https://i.stack.imgur.com/Ck0aC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ck0aC.png" alt="e.detail.response is null"></a></p>
  
  <p>In network tab I can see the response (simple 'hello'):</p>
  
  <p><a href="https://i.stack.imgur.com/lfJKh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lfJKh.png" alt="Response in network tab"></a></p>