<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
  <title>Jsonp</title>
  <script src="../../polymer/polymer.js"></script>
  <link rel="import" href="../elements/g-jsonp.html">
</head>
<body>
  <g-jsonp url="https://clients1.google.com/finance/info?q=GOOG&client=ig&callback="></g-jsonp>
  <template bind="{{stockquote}}">
    <div>quote: {{l}}</div>
  </template>
  <script>
    document.addEventListener('WebComponentsReady', function() {
      var jsonp = document.querySelector("g-jsonp");
      jsonp.addEventListener("response", 
        function(inEvent) {
          document.querySelector('template').model = {
            stockquote: inEvent.detail.response[0]
          };
        }
      );
    });
  </script>
</body>
</html>
