On Github bawigga / slides-web-components
This is known as semantics.
We've all built something like this:
<div class="schedule"> <h1 class="schedule__header">Basketball Schedule</h1> <table class="schedule__table"> <thead class="schedule__table__heading"> <tr> <td>Time</td> <td>Event</td> <td>State</td> </tr> </thead> <tbody class="schedule__table__body"> <tr> <td class="schedule__table__body__time">10:00 PM MST</td> <td class="schedule__table__body__event">TTU @ TCU</td> <td class="schedule__table__body__state">In Progress</td> </tr> </tbody> </table> </div>
<div class="panel panel-default"> <div class="panel-body"> <p>Basic Panel Example</p> </div> </div>(Bootstrap Panel example code)
<panel> <panel-body> <p>Basic Panel Example</p> </panel-body> </panel>
Components with APIs, state, events, and life cycles.
Audio and Video tags use the same technology as Web Components will in the future.
Web Components refer to a collection of new APIs from the W3C.
<template id="MediaTemplate"> <h2></h2> <img src="" alt=""> </template>
markup is hidden from the DOM so it doesn't render.
Script doesn't run, images don't load, audio doesn't play
<template id="MediaTemplate"> <div class="media-item"> <h2></h2> <script> console.log('my template loaded!'); </script> <img src="/images/article.png" alt=""> </div> </template>