OLD | NEW |
1 <!-- | 1 <!-- |
2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 --> | 5 --> |
6 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> | 6 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
7 | 7 |
8 <sky-element name="test-element"> | 8 <sky-element name="test-element"> |
9 <template> | 9 <template> |
10 <div id="inside" on-test-event="handleEvent" attr="{{ value }}">{{ value }}</d
iv> | 10 <div id="inside" on-test-event="handleEvent" attr="{{ value }}">{{ value }}</d
iv> |
11 </template> | 11 </template> |
12 <script> | 12 <script> |
13 module.exports = class extends SkyElement { | 13 module.exports = class extends SkyElement { |
14 created() { | 14 created() { |
15 this.lastEvent = null; | 15 this.lastEvent = null; |
16 this.value = 10; | 16 this.value = 10; |
| 17 this.shadowRootReadyCount = 0; |
17 } | 18 } |
18 handleEvent(event) { | 19 handleEvent(event) { |
19 this.lastEvent = event; | 20 this.lastEvent = event; |
20 } | 21 } |
| 22 shadowRootReady() { |
| 23 this.shadowRootReadyCount++; |
| 24 } |
21 }.register(); | 25 }.register(); |
22 </script> | 26 </script> |
23 </sky-element> | 27 </sky-element> |
OLD | NEW |