Permalink
Please sign in to comment.
Browse files
Fixes #2098: don't accept undefined values as initial config
- Loading branch information...
Showing
with
95 additions
and 1 deletion.
- +8 −1 src/standard/configure.html
- +68 −0 test/smoke/bind-smoke2.html
- +12 −0 test/unit/dom-bind-elements1.html
- +7 −0 test/unit/dom-bind.html
9
src/standard/configure.html
68
test/smoke/bind-smoke2.html
| @@ -0,0 +1,68 @@ | ||
| +<!doctype html> | ||
| +<!-- | ||
| +@license | ||
| +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
| +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
| +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
| +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
| +Code distributed by Google as part of the polymer project is also | ||
| +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
| +--> | ||
| +<link rel="import" href="../../polymer.html"> | ||
| + | ||
| +<body> | ||
| + | ||
| + <dom-module is="data-source"> | ||
| + <template> | ||
| + <span>{{prop}}</span> | ||
| + <span>{{data.length}}</span>: length | ||
| + <br> | ||
| + | ||
| + <template is="dom-repeat" items="{{data}}"> | ||
| + <span>{{item}}</span> | ||
| + </template>:items | ||
| + </template> | ||
| + </dom-module> | ||
| + | ||
| + | ||
| + <script> | ||
| + Polymer({ | ||
| + is: 'data-source', | ||
| + | ||
| + properties: { | ||
| + data: { | ||
| + //readOnly: true, | ||
| + notify: true, | ||
| + type: Array, | ||
| + value: [1, 2, 3] | ||
| + }, | ||
| + | ||
| + prop: { | ||
| + readOnly: true, | ||
| + notify: true, | ||
| + type: String, | ||
| + value: 'foo' | ||
| + } | ||
| + } | ||
| + }); | ||
| + </script> | ||
| + | ||
| + | ||
| + <template is="dom-bind"> | ||
| + | ||
| + <h1>Element</h1> | ||
| + <data-source data="{{data}}" prop="{{prop}}"></data-source> | ||
| + | ||
| + <h1>Databound</h1> | ||
| + | ||
| + <span>{{prop}}</span> | ||
| + | ||
| + <template is="dom-repeat" items="{{data}}"> | ||
| + <span>{{item}}</span> | ||
| + </template> | ||
| + | ||
| + </template> | ||
| + | ||
| + | ||
| + | ||
| +</body> |
12
test/unit/dom-bind-elements1.html
7
test/unit/dom-bind.html
0 comments on commit
1a5c391