File tree Expand file tree Collapse file tree 3 files changed +55
-2
lines changed Expand file tree Collapse file tree 3 files changed +55
-2
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+ < head >
4
+ < title > bind simple</ title >
5
+ < script src ="../../polymer.js "> </ script >
6
+ < script src ="../../tools/test/htmltest.js "> </ script >
7
+ < script src ="../../node_modules/chai/chai.js "> </ script >
8
+ </ head >
9
+ < body >
10
+ < x-foo > </ x-foo >
11
+
12
+ < polymer-element name ="x-bar " noscript >
13
+ < template >
14
+ x-bar
15
+ </ template >
16
+ </ polymer-element >
17
+
18
+ < polymer-element name ="x-foo ">
19
+ < template >
20
+ < div id ="foo " foo ="{{foo}} "> </ div >
21
+ < div id ="bool " foo? ="{{foo}} "> </ div >
22
+ < div id ="content "> {{foo}}</ div >
23
+ < x-bar id ="bar " foo ="{{foo}} " > </ x-bar >
24
+ < x-bar id ="barBool " foo? ="{{foo}} "> </ x-bar >
25
+ < x-bar id ="barContent "> {{foo}}</ x-bar >
26
+ </ template >
27
+ < script >
28
+ Polymer ( 'x-foo' , {
29
+ foo : 'foo!' ,
30
+ ready : function ( ) {
31
+ chai . assert . equal ( this . foo , this . $ . foo . getAttribute ( 'foo' ) ) ;
32
+ chai . assert . equal ( this . $ . bool . getAttribute ( 'foo' ) , '' ) ;
33
+ chai . assert . isFalse ( this . $ . bool . hasAttribute ( 'foo?' ) ) ;
34
+ chai . assert . equal ( this . $ . content . innerHTML , this . foo ) ;
35
+ //
36
+ chai . assert . equal ( this . foo , this . $ . bar . getAttribute ( 'foo' ) ) ;
37
+ chai . assert . equal ( this . $ . barBool . getAttribute ( 'foo' ) , '' ) ;
38
+ chai . assert . isFalse ( this . $ . barBool . hasAttribute ( 'foo?' ) ) ;
39
+ chai . assert . equal ( this . $ . barContent . innerHTML , this . foo ) ;
40
+ done ( ) ;
41
+ }
42
+ } )
43
+ </ script >
44
+ </ polymer-element >
45
+ </ body >
46
+ </ html >
Original file line number Diff line number Diff line change 12
12
13
13
< x-extendor > </ x-extendor >
14
14
15
- < x-repeat > </ x-repeat >
15
+ < x-nested- repeat > </ x-nested -repeat >
16
16
17
17
< polymer-element name ="x-base ">
18
18
< script >
86
86
} ) ;
87
87
</ script >
88
88
</ polymer-element >
89
+
90
+ < polymer-element name ="x-nested-repeat " noscript >
91
+ < template >
92
+ < x-repeat id ="repeat "> </ x-repeat >
93
+ </ template >
94
+ </ polymer-element >
89
95
90
96
< script >
91
97
document . addEventListener ( 'WebComponentsReady' , function ( ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ suite('bindMDV', function() {
51
51
} ) ;
52
52
53
53
54
- htmlSuite ( 'unbind ' , function ( ) {
54
+ htmlSuite ( 'bind ' , function ( ) {
55
55
htmlTest ( 'html/template-distribute-dynamic.html' ) ;
56
+ htmlTest ( 'html/bind.html' ) ;
56
57
htmlTest ( 'html/unbind.html' ) ;
57
58
} ) ;
You can’t perform that action at this time.
0 commit comments