|
19 | 19 |
|
20 | 20 |
|
21 | 21 | <style> |
22 | | - /* |
23 | | - @font-face { |
24 | | - font-family: "street-eagle"; |
25 | | - src: url(/fonts/street-eagle.ttf) format('truetype'); |
26 | | - } |
27 | | - */ |
28 | | - |
29 | | - #links a {display:block} |
30 | | - |
| 22 | + |
| 23 | + /* |
| 24 | + @font-face { |
| 25 | + font-family: "street-eagle"; |
| 26 | + src: url(/fonts/street-eagle.ttf) format('truetype'); |
| 27 | + } |
| 28 | + */ |
| 29 | + |
| 30 | + #links a {display:block} |
| 31 | + |
| 32 | + |
| 33 | + .hr2 |
| 34 | + {border-top:1px solid blue;margin:30px} |
| 35 | + |
31 | 36 | </style> |
32 | 37 |
|
33 | 38 |
|
|
59 | 64 | </div> |
60 | 65 |
|
61 | 66 |
|
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
62 | 71 | <div id="scroll"> |
63 | 72 | <div id="center" style=""> |
64 | 73 |
|
65 | 74 | <!-- page html --> |
66 | 75 |
|
67 | 76 |
|
68 | 77 | <div style="margin-bottom: 20px;"> |
69 | | -this is a work in progress, i intend to build up here a collection of reusable html components |
| 78 | + i include here a standard example of web components, which i feel went some way as to introducing the ability to include complex functionality |
| 79 | + into web pages, i feel however it fell short on a number of issues i have solved with my component.js library, these are |
| 80 | + <ul> |
| 81 | + <li> |
| 82 | + elements were scoped to the global namespace, always a problem when functionality gets ever more complex its only a matter |
| 83 | + of time before clashes occur |
| 84 | + </li> |
| 85 | + <li> |
| 86 | + methods and properties associated with the component were added to the host node of the element, again thats ok for simple |
| 87 | + components, but when components get ever more complex its going to be a problem |
| 88 | + </li> |
| 89 | + </ul> |
70 | 90 | </div> |
| 91 | + |
| 92 | + <div> |
| 93 | + <p> |
| 94 | + to me a component / module should have a standard lifecycle that is |
| 95 | + </p> |
| 96 | + <ul> |
| 97 | + <li> |
| 98 | + initmod, this is where local depencies are passed to the component, they fundamentally should not be relying on global |
| 99 | + state to receive their local depencies |
| 100 | + </li> |
| 101 | + <li> |
| 102 | + init, this is where the component first get executed, its an asynchronous function that allows the component to check |
| 103 | + that it has everything it needs to run, including access to the network to load resources it may need |
| 104 | + </li> |
| 105 | + <li> |
| 106 | + initdom, this is where the component is able to set up its ui, internally build the references it needs to run effeiciently |
| 107 | + in code |
| 108 | + </li> |
| 109 | + </ul> |
| 110 | + <p> |
| 111 | + components should also be effectively namespaced so they are free to load any other components that they may need without having to |
| 112 | + worry that there will ever be a clash |
| 113 | + </p> |
| 114 | + </div> |
| 115 | + <div> |
| 116 | + <p> |
| 117 | + my component library just needs to be included as a script tag, it runs on window.onload, it has a fundatmental loading stack that allows |
| 118 | + init runs to be delayed until the loading stack is complete |
| 119 | + </p> |
| 120 | + </div> |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + <div class=hr2></div> |
| 126 | + |
| 127 | + |
71 | 128 | <div style="margin-bottom: 20px;"> |
72 | | -users are able to supply their own components and therefore build up a rich selection of components |
| 129 | + users are able to supply their own components and therefore build up a rich selection of components |
73 | 130 | </div> |
74 | 131 | <div style="margin-bottom: 20px;"> |
75 | | -to get the whole thing started and supply and example, i have created the first, simple, example |
| 132 | + to get the whole thing started and supply and example, i have created the first, simple, example |
76 | 133 | </div> |
77 | 134 |
|
78 | 135 | <div style="margin-bottom: 20px;"> |
79 | 136 | <a href="select/select.html"> |
80 | | -custom select |
| 137 | + custom select |
81 | 138 | </a> |
82 | 139 | </div> |
83 | 140 |
|
84 | 141 | <div style="margin-bottom: 20px;"> |
85 | 142 | <a href="checkbox-one/checkbox-one.html"> |
86 | | -checkbox-one |
| 143 | + checkbox-one |
87 | 144 | </a> |
88 | 145 | </div> |
89 | 146 |
|
90 | 147 | <div style="margin-bottom: 20px;"> |
91 | 148 | <a href="log/log.html"> |
92 | | -log |
| 149 | + log |
93 | 150 | </a> |
94 | 151 | </div> |
95 | 152 |
|
96 | 153 | <div style="margin-bottom: 20px;"> |
97 | | -keep checking back for more examples and an interface for user supplied examples |
| 154 | + keep checking back for more examples and an interface for user supplied examples |
98 | 155 | </div> |
99 | 156 |
|
100 | 157 |
|
|
0 commit comments