-
Notifications
You must be signed in to change notification settings - Fork 2k
/
g-foo.html
51 lines (51 loc) · 1.24 KB
/
g-foo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!--
/*
* Copyright 2012 The Toolkitchen Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
-->
<element name="g-foo" attributes="str, bool, num" handlers="click: clickHandler">
<link rel="components" href="../src/g-component.html">
<template>
<div id="ref1" atclick="ref1ClickHandler">
<div id="ref2">hello!!!</div>
</div>
<content></content>
</template>
<script>
this.component({
published: {
strp: '',
boolp: false,
nump: 0
},
prototype: {
strChanged: function() {
this._str = this.str;
},
boolChanged: function() {
this._bool = this.bool;
},
numChanged: function() {
this._num = this.num;
},
strpChanged: function() {
this._strp = this.strp;
},
boolpChanged: function() {
this._boolp = this.boolp;
},
numpChanged: function() {
this._nump = this.nump;
},
clickHandler: function() {
this._click = true;
},
ref1ClickHandler: function() {
this._ref1click = true;
}
}
});
</script>
</element>