Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit cd8f2ed

Browse files
committed
Add test for dynamic auto-binding template, fixes #29
1 parent 2366fd3 commit cd8f2ed

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/html/auto-binding.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,26 @@ <h2 id="h" on-tap="{{eventAction}}">{{greeting}}</h2>
4646
}
4747

4848
var events = 0;
49-
49+
5050
addEventListener('template-bound', function(e) {
5151
events++;
5252
if (e.target.id === 'one') {
5353
e.target.test();
5454
}
5555

56-
if (events === 2) {
56+
if (events === 3) {
5757
done();
5858
}
5959

6060
});
6161

62+
// test dynamic creation
63+
addEventListener('polymer-ready', function() {
64+
var d = document.createElement('div');
65+
d.innerHTML ='<template is="auto-binding">Dynamical <input value="{{value}}"><div>{{value}}</div></template>';
66+
document.body.appendChild(d);
67+
});
68+
6269
</script>
6370

6471
</body>

0 commit comments

Comments
 (0)