You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on May 29, 2019. It is now read-only.
Error in example from /devguide/templates.html#dom-bind #1275
I posted a PR for it #1276
As dom-change event works fine for root dom-bind element.
I tried to make it work for nested templates but with no luck
<body><!-- Wrap elements with auto-binding template to --><!-- allow use of Polymer bindings in main document --><templateis="dom-bind" id="r">
List:
<iron-ajaxurl="http://..." last-response="{{data}}"></iron-ajax><templateid="t" is="dom-repeat" items="{{data}}"><div>first:<span>{{item.first}}</span> last:<span>{{item.last}}</span></div></template></template></body><script>varr=document.querySelector('#r');// The dom-change event signifies when the template has stamped its DOM.r.addEventListener('dom-change',function(){// auto-binding template is ready.vart=document.querySelector('#t');console.log("Root dom-bind works!");// The dom-change event signifies when the template has stamped its DOM.t.addEventListener('dom-change',function(){// dom-repeat template is ready.console.log("Does nested dom-repeat work?");});});</script>
After copy'n'pasing example from https://www.polymer-project.org/1.0/docs/devguide/templates.html#dom-bind I get:
I suspect it's because
<template id="t" is="dom-repeat" items="{{data}}">is not yet stamped from<template is="dom-bind">.