203203 < div id =center >
204204
205205 < div >
206+
206207 < h3 >
207208 Getting Started
208209 </ h3 >
210+
211+
209212 < p >
210213 to get web components working include the component library
211214 </ p >
212215
213216 < code-src src ='ex/component-include.js '> </ code-src >
214217
218+
219+ < h4 >
220+ mod
221+ </ h4 >
222+
223+ < p >
224+ the component.js library exposes a
225+ < b >
226+ mod
227+ </ b >
228+ object, which holds as its keys the component modules, the key is either the element nodename,
229+ or its id, the id can be used when the page contains multiple of the same component
230+ </ P >
231+
232+ < code >
233+
234+ var editor = mod['web-editor'];
235+
236+ var editor2 = mod.test;
237+
238+ </ code >
239+
240+
241+ < h4 >
242+ the [component] attribute
243+ </ h4 >
244+
215245 < p >
216246 after that any elements with a
217247 < b >
@@ -230,22 +260,8 @@ <h3>
230260 </ script >
231261 </ code >
232262
233- < p >
234- the component.js library exposes a
235- < b >
236- mod
237- </ b >
238- object, which holds as its keys the component modules, the key is either the element nodename,
239- or its id, the id can be used when the page contains multiple of the same component
240- </ P >
241263
242- < code >
243264
244- var editor = mod['web-editor'];
245-
246- var editor2 = mod.test;
247-
248- </ code >
249265
250266 < snippet-html id =web-editor-demo component src ='ex/web-editor-demo.html ' style ='display:block;margin-top:50px '> </ snippet-html >
251267
@@ -266,10 +282,14 @@ <h3>
266282 </ p >
267283 < p >
268284 < code >
269- http://libs.ext-code.com/js/dom/component/component.js?init
285+ http://libs.ext-code.com/js/dom/component/v2.0/ component.js?hdr
270286 </ code >
271287 < br >
272- adding the init search parameter automatically sets up the default boilerplate, which for most of the official
288+ adding the
289+ < b >
290+ ?hdr
291+ </ b >
292+ search parameter automatically sets up the default boilerplate, which for most of the official
273293 components is all that is required.
274294 </ p >
275295
309329
310330 < div >
311331 < p >
312- a component / module will has a standard lifecycle that is
332+ a component / module typically has a standard lifecycle that is
313333 </ p >
314334
315335 < ul >
320340 < br >
321341 This is where local depencies are / can be passed to the component
322342 < br >
323- They fundamentally should not be relying on global state to receive their local depencies
343+ They fundamentally should not be relying on global state to receive their local depencies, this method is not always
344+ needed
324345 </ li >
325346 < li >
326347 < b >
335356 initdom
336357 </ b >
337358 < br >
338- This is where the component is able to set up its ui, internally build the references it needs to run effeiciently,
359+ This is where the component is able to set up its ui / dom , internally build the references it needs to run effeiciently,
339360 it should be treated potentially as asynchronous
340361 </ li >
341362 </ ul >
0 commit comments