|
62 | 62 | mod.base.add({ext,$,datatype,keydown,menu,menumod,ace}); |
63 | 63 |
|
64 | 64 |
|
| 65 | + await mod.auto('demo-example-1'); |
| 66 | + |
| 67 | + |
65 | 68 | hdr = mod['html-components-hdr']; |
66 | 69 | log = mod['log-mod']; |
67 | 70 |
|
|
71 | 74 | ex['web-editor-demo'] = mod['web-editor-demo']; |
72 | 75 |
|
73 | 76 |
|
74 | | - |
75 | 77 | hdr.initmod({ext,$,menu,log}); |
76 | 78 | log.initmod({ext,$}); |
77 | 79 |
|
@@ -243,13 +245,13 @@ <h4> |
243 | 245 |
|
244 | 246 |
|
245 | 247 | <h4> |
246 | | - the [component] attribute |
| 248 | + the [ component ] attribute |
247 | 249 | </h4> |
248 | 250 |
|
249 | 251 | <p> |
250 | | - after that any elements with a |
| 252 | + any elements with a |
251 | 253 | <b> |
252 | | - [component] |
| 254 | + [ component ] |
253 | 255 | </b> |
254 | 256 | attribute will be treated as a web component module |
255 | 257 | </p> |
@@ -350,32 +352,7 @@ <h3> |
350 | 352 | </div> |
351 | 353 |
|
352 | 354 |
|
353 | | - <div style='margin-top:50px;margin-bottom:50px'> |
354 | | - |
355 | | - <p> |
356 | | - view the full list of components |
357 | | - <br> |
358 | | - <a href='html-components-list/html-components-list.html'> |
359 | | - html component list |
360 | | - </a> |
361 | | - </p> |
362 | | - |
363 | | - <p> |
364 | | - view the |
365 | | - <b> |
366 | | - component.js |
367 | | - </b> |
368 | | - library documentation and api |
369 | | - <br> |
370 | | - <a href='component-library/component-library.html'> |
371 | | - component library |
372 | | - </a> |
373 | | - </p> |
374 | | - |
375 | | - </div> |
376 | | - |
377 | | - |
378 | | - <div style='display:block;margin-top:100px'> |
| 355 | + <div> |
379 | 356 | <p> |
380 | 357 | the code for a component, note |
381 | 358 | </p> |
@@ -443,16 +420,19 @@ <h3> |
443 | 420 |
|
444 | 421 | </ul> |
445 | 422 |
|
446 | | - <web-editor id=ex2 component fullsize src='https://libs.ext-code.com/html/log-mod/log-mod.html'></web-editor> |
| 423 | + |
| 424 | + <p> |
| 425 | + Skeletal function definition |
| 426 | + </p> |
| 427 | + |
| 428 | + <code-src src='ex/define-component.js'></code-src> |
447 | 429 |
|
448 | 430 | </div> |
449 | 431 |
|
450 | 432 |
|
451 | | - |
452 | | - |
453 | 433 | <div> |
454 | 434 | <p> |
455 | | - a component / module typically has a standard lifecycle that is |
| 435 | + a typical component / module lifecycle might be |
456 | 436 | </p> |
457 | 437 |
|
458 | 438 | <ul> |
@@ -490,6 +470,45 @@ <h3> |
490 | 470 | </p> |
491 | 471 | </div> |
492 | 472 |
|
| 473 | + |
| 474 | + <div style='margin-top:50px;margin-bottom:50px'> |
| 475 | + |
| 476 | + <p> |
| 477 | + view the full list of components |
| 478 | + <br> |
| 479 | + <a href='html-components-list/html-components-list.html'> |
| 480 | + html component list |
| 481 | + </a> |
| 482 | + </p> |
| 483 | + |
| 484 | + <p> |
| 485 | + view the |
| 486 | + <b> |
| 487 | + component.js |
| 488 | + </b> |
| 489 | + library documentation and api |
| 490 | + <br> |
| 491 | + <a href='component-library/component-library.html'> |
| 492 | + component library |
| 493 | + </a> |
| 494 | + </p> |
| 495 | + |
| 496 | + </div> |
| 497 | + |
| 498 | + |
| 499 | + <div> |
| 500 | + <p> |
| 501 | + here is a very simple component |
| 502 | + </p> |
| 503 | + <web-editor id=ex2 component fullsize mode=html src='https://libs.ext-code.com/html/demo/demo-example/demo-example.html'></web-editor> |
| 504 | + <p> |
| 505 | + and the code to include it |
| 506 | + </p> |
| 507 | + <snippet-html id=demo-example-1 component src='https://libs.ext-code.com/html/demo/demo-example/examples/demo-example-1.html'></snippet-html> |
| 508 | + </div> |
| 509 | + |
| 510 | + |
| 511 | + |
493 | 512 | <div> |
494 | 513 | <p> |
495 | 514 | the component library just needs to be included as a script tag, it exposes a global property mod, |
|
0 commit comments