-
Notifications
You must be signed in to change notification settings - Fork 0
/
cb-order.html
123 lines (123 loc) · 2.43 KB
/
cb-order.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!doctype html>
<html>
<head>
<link href="../components/polymer/polymer.html" rel="import">
<script src="../components/platform-dev/platform.js"></script>
</head>
<body>
<polymer-element name="x-a">
<script>
Polymer('x-a', {
created: function() {
// console.log('x-a created');
},
ready: function() {
// console.log('x-a ready');
},
enteredView: function() {
console.log('x-a enteredView');
}
});
</script>
</polymer-element>
<polymer-element name="x-b">
<script>
Polymer('x-b', {
created: function() {
// console.log('x-b created');
},
ready: function() {
// console.log('x-b ready');
},
enteredView: function() {
console.log('x-b enteredView');
}
});
</script>
</polymer-element>
<polymer-element name="x-c">
<!--
<template>
<x-a></x-a>
<x-b></x-b>
</template>
-->
<script>
Polymer('x-c', {
created: function() {
// console.log('x-c created');
},
ready: function() {
// console.log('x-c ready');
},
enteredView: function() {
console.log('x-c enteredView');
}
});
</script>
</polymer-element>
<polymer-element name="x-d">
<template>
<x-a>
<x-b></x-b>
<x-c></x-c>
</x-a>
</template>
<script>
Polymer('x-d', {
created: function() {
// console.log('x-d created');
},
ready: function() {
// console.log('x-d ready');
},
enteredView: function() {
console.log('x-d enteredView');
}
});
</script>
</polymer-element>
<!-- <x-d></x-d> -->
<div id="target"></div>
<script>
document.addEventListener('WebComponentsReady', function() {
target.innerHTML = '<x-a><x-b></x-b><x-c></x-c></x-a>';
// target.innerHTML = '<x-d></x-d>';
});
document.register('x-x', {prototype: {
createdCallback: function() {
console.log('x-x created');
},
enteredViewCallback: function() {
console.log('x-x enteredView');
}
}});
document.register('x-y', {prototype: {
createdCallback: function() {
console.log('x-y created');
},
enteredViewCallback: function() {
console.log('x-y enteredView');
}
}});
document.register('x-z', {prototype: {
createdCallback: function() {
console.log('x-z created');
},
enteredViewCallback: function() {
console.log('x-z enteredView');
}
}});
</script>
<!--
<x-x>
<x-y></x-y>
<x-z></x-z>
</x-x>
<x-a>
<x-b></x-b>
<x-c></x-c>
</x-a>
-->
</body>
</html>