1<!-- 2@license 3Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7Code distributed by Google as part of the polymer project is also 8subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9--> 10 11<link rel='import' href='../iron-location.html'> 12<link rel='import' href='../../polymer/polymer.html'> 13 14<script> 15 Polymer({ 16 is: 'default-value', 17 properties: { 18 val: { 19 type: String, 20 notify: true, 21 value: 'default-value' 22 } 23 }, 24 }); 25 26 Polymer({ 27 is: 'on-attached', 28 properties: { 29 val: { 30 type: String, 31 notify: true, 32 value: 'on-attached-default-value' 33 } 34 }, 35 attached: function() { 36 if (this.val === 'on-attached-default-value') { 37 this.val = 'on-attached'; 38 } 39 } 40 }); 41 42 Polymer({ 43 is: 'on-ready', 44 properties: { 45 val: { 46 type: String, 47 notify: true, 48 value: 'on-ready-default-value' 49 } 50 }, 51 ready: function() { 52 this.val = 'on-ready'; 53 } 54 }); 55 56 Polymer({ 57 is: 'on-timeout', 58 properties: { 59 val: { 60 type: String, 61 notify: true, 62 value: 'on-timeout-default-value' 63 } 64 }, 65 attached: function() { 66 setTimeout(function() { 67 this.val = 'on-timeout'; 68 }.bind(this), 10); 69 } 70 }) 71</script> 72 73<dom-module id='default-before'> 74 <template> 75 <default-value value='{{val}}'></default-value> 76 <iron-location query='{{val}}'></iron-location> 77 78 </template> 79 <script>Polymer({is: 'default-before', properties: {val: {type: String}}});</script> 80</dom-module> 81 82<dom-module id='attached-before'> 83 <template> 84 <on-attached val='{{val}}'></on-attached> 85 <iron-location query='{{val}}'></iron-location> 86 </template> 87 <script>Polymer({is: 'attached-before', properties: {val: {type: String}}});</script> 88</dom-module> 89 90<dom-module id='ready-before'> 91 <template> 92 <on-ready val='{{val}}'></on-ready> 93 <iron-location query='{{val}}'></iron-location> 94 </template> 95 <script>Polymer({is: 'ready-before', properties: {val: {type: String}}});</script> 96</dom-module> 97 98<dom-module id='timeout-before'> 99 <template> 100 <on-timeout val='{{val}}'></on-timeout> 101 <iron-location query='{{val}}'></iron-location> 102 </template> 103 <script>Polymer({is: 'timeout-before', properties: {val: {type: String}}});</script> 104</dom-module> 105 106 107<dom-module id='default-after'> 108 <template> 109 <iron-location query='{{val}}'></iron-location> 110 <default-value value='{{val}}'></default-value> 111 </template> 112 <script>Polymer({is: 'default-after', properties: {val: {type: String}}});</script> 113</dom-module> 114 115<dom-module id='attached-after'> 116 <template> 117 <iron-location query='{{val}}'></iron-location> 118 <on-attached val='{{val}}'></on-attached> 119 </template> 120 <script>Polymer({is: 'attached-after', properties: {val: {type: String}}});</script> 121</dom-module> 122 123<dom-module id='ready-after'> 124 <template> 125 <iron-location query='{{val}}'></iron-location> 126 <on-ready val='{{val}}'></on-ready> 127 </template> 128 <script>Polymer({is: 'ready-after', properties: {val: {type: String}}});</script> 129</dom-module> 130 131<dom-module id='timeout-after'> 132 <template> 133 <iron-location query='{{val}}'></iron-location> 134 <on-timeout val='{{val}}'></on-timeout> 135 </template> 136 <script>Polymer({is: 'timeout-after', properties: {val: {type: String}}});</script> 137</dom-module> 138 139 140<dom-module id='default-below'> 141 <template> 142 <iron-location query='{{val}}'> 143 <default-value value='{{val}}'></default-value> 144 </iron-location> 145 </template> 146 <script>Polymer({is: 'default-below', properties: {val: {type: String}}});</script> 147</dom-module> 148 149<dom-module id='attached-below'> 150 <template> 151 <iron-location query='{{val}}'> 152 <on-attached val='{{val}}'></on-attached> 153 </iron-location> 154 </template> 155 <script>Polymer({is: 'attached-below', properties: {val: {type: String}}});</script> 156</dom-module> 157 158<dom-module id='ready-below'> 159 <template> 160 <iron-location query='{{val}}'> 161 <on-ready val='{{val}}'></on-ready> 162 </iron-location> 163 </template> 164 <script>Polymer({is: 'ready-below', properties: {val: {type: String}}});</script> 165</dom-module> 166 167<dom-module id='timeout-below'> 168 <template> 169 <iron-location query='{{val}}'> 170 <on-timeout val='{{val}}'></on-timeout> 171 </iron-location> 172 </template> 173 <script>Polymer({is: 'timeout-below', properties: {val: {type: String}}});</script> 174</dom-module> 175 176 177<dom-module id='default-above'> 178 <template> 179 <default-value value='{{val}}'> 180 <iron-location query='{{val}}'></iron-location> 181 </default-value> 182 </template> 183 <script>Polymer({is: 'default-above', properties: {val: {type: String}}});</script> 184</dom-module> 185 186<dom-module id='attached-above'> 187 <template> 188 <on-attached val='{{val}}'> 189 <iron-location query='{{val}}'> 190 </iron-location> 191 </on-attached> 192 </template> 193 <script>Polymer({is: 'attached-above', properties: {val: {type: String}}});</script> 194</dom-module> 195 196<dom-module id='ready-above'> 197 <template> 198 <on-ready val='{{val}}'> 199 <iron-location query='{{val}}'> 200 </iron-location> 201 </on-ready> 202 </template> 203 <script>Polymer({is: 'ready-above', properties: {val: {type: String}}});</script> 204</dom-module> 205 206<dom-module id='timeout-above'> 207 <template> 208 <on-timeout val='{{val}}'> 209 <iron-location query='{{val}}'></iron-location> 210 </on-timeout> 211 </template> 212 <script>Polymer({is: 'timeout-above', properties: {val: {type: String}}});</script> 213</dom-module> 214 215 216<dom-module id='default-container'> 217 <template> 218 <iron-location query='{{val}}'></iron-location> 219 </template> 220 <script> 221 Polymer({ 222 is: 'default-container', 223 properties: {val: {type: String, value: 'default-container-val'}} 224 }); 225 </script> 226</dom-module> 227 228<dom-module id='attached-container'> 229 <template> 230 <iron-location query='{{val}}'></iron-location> 231 </template> 232 <script> 233 Polymer({ 234 is: 'attached-container', 235 properties: {val: {type: String, value: 'container-attached-default-val'}}, 236 attached: function() { 237 if (this.val === 'container-attached-default-val') { 238 this.val = 'attached-container-val'; 239 } 240 } 241 }); 242 </script> 243</dom-module> 244 245<dom-module id='ready-container'> 246 <template> 247 <iron-location query='{{val}}'></iron-location> 248 </template> 249 <script> 250 Polymer({ 251 is: 'ready-container', properties: {val: {type: String}}, 252 ready: function() { 253 this.val = 'ready-container-val'; 254 } 255 }); 256 </script> 257</dom-module> 258 259<dom-module id='timeout-container'> 260 <template> 261 <iron-location query='{{val}}'></iron-location> 262 </template> 263 <script>Polymer({ 264 is: 'timeout-container', 265 properties: { 266 val: { 267 type: String, 268 notify: true 269 } 270 }, 271 attached: function() { 272 setTimeout(function() { 273 this.val = 'on-timeout'; 274 }.bind(this), 10); 275 } 276 });</script> 277</dom-module> 278