forked from Polymer/polymer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
polymer.html
120 lines (108 loc) · 3.83 KB
/
polymer.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
<!--
@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-mini.html">
<link rel="import" href="src/standard/annotations.html">
<link rel="import" href="src/standard/events.html">
<link rel="import" href="src/standard/gestures.html">
<link rel="import" href="src/standard/utils.html">
<link rel="import" href="src/standard/effectBuilder.html">
<link rel="import" href="src/standard/configure.html">
<link rel="import" href="src/standard/notify-path.html">
<link rel="import" href="src/standard/resolveUrl.html">
<link rel="import" href="src/standard/styling.html">
<link rel="import" href="src/standard/x-styling.html">
<script>
Polymer.Base._addFeature({
_registerFeatures: function() {
// identity
this._prepIs();
// factory
this._prepConstructor();
// styles
this._prepStyles();
},
_finishRegisterFeatures: function() {
// template
this._prepTemplate();
// style shimming
this._prepShimStyles();
// template markup
this._prepAnnotations();
// accessors
this._prepEffects();
// shared behaviors
this._prepBehaviors();
// fast access to property info
this._prepPropertyInfo();
// accessors part 2
this._prepBindings();
// dom encapsulation
this._prepShady();
},
_prepBehavior: function(b) {
this._addPropertyEffects(b.properties);
this._addComplexObserverEffects(b.observers);
this._addHostAttributes(b.hostAttributes);
},
_initFeatures: function() {
// setup gestures
this._setupGestures();
// manage configuration
this._setupConfigure();
// setup style properties
this._setupStyleProperties();
// setup debouncers
this._setupDebouncers();
// setup shady
this._setupShady();
this._registerHost();
if (this._template) {
// manage local dom
this._poolContent();
// host stack
this._beginHosting();
// instantiate template
this._stampTemplate();
// host stack
this._endHosting();
// concretize template references
this._marshalAnnotationReferences();
}
// concretize effects on instance
this._marshalInstanceEffects();
// acquire instance behaviors
this._marshalBehaviors();
/*
TODO(sorvell): It's *slightly() more efficient to marshal attributes prior
to installing hostAttributes, but then hostAttributes must be separately
funneled to configure, which is cumbersome.
Since this delta seems hard to measure we will not bother atm.
*/
// install host attributes
this._marshalHostAttributes();
// acquire initial instance attribute values
this._marshalAttributes();
// top-down initial distribution, configuration, & ready callback
this._tryReady();
},
_marshalBehavior: function(b) {
// establish listeners on instance
if (b.listeners) {
this._listenListeners(b.listeners);
}
}
});
</script>
<link rel="import" href="src/lib/custom-style.html">
<link rel="import" href="src/lib/template/dom-template.html">
<link rel="import" href="src/lib/template/dom-repeat.html">
<link rel="import" href="src/lib/template/array-selector.html">
<link rel="import" href="src/lib/template/dom-if.html">
<link rel="import" href="src/lib/template/dom-bind.html">