Files
polymer/workbench/jsonp.html
T
2013-04-04 15:43:29 -07:00

34 lines
964 B
HTML

<!DOCTYPE html>
<!--
Copyright 2013 The Toolkitchen 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="../platform/platform.js"></script>
<script src="../toolkit.js"></script>
<link rel="import" href="../components/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) {
var model = {
stockquote: inEvent.detail.response[0]
};
HTMLTemplateElement.bindTree(wrap(document.body), model)
}
);
});
</script>
</body>
</html>