Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OWDD Intro To Web Components

OWDD Intro To Web Components

An overview of Web Components

James

May 28, 2016
Tweet

More Decks by James

Other Decks in Programming

Transcript

  1. <wc-what> </wc-what> A set of features that is currently being

    added to the HTML (hyper-text markup language) and DOM (document object model) specifications that allows for the creation of reusable components/widgets.
  2. <wc-idea> </wc-idea> The idea behind web components • Code reuse

    • Encapsulation • Separation of Concerns • Composition • Theming • Expressive • Semantics
  3. <wc-element> </wc-element> Custom Elements: The ability to create your own

    tags and elements. These elements can have their own scripted behaviour and CSS styling. *It’s currently possible to create custom tags and style it with css & attach behaviours to it via js. The custom elements for web components have lifecycle callbacks (created, attached, detached, changed).
  4. <wc-imports> </wc-imports> HTML Imports <link rel=”import” href=”file.html”> The ability to

    include and reuse HTML documents in other HTML Documents But is intended to be the packaging mechanism of Web Components
  5. <wc-templates> </wc-templates> Templates = THINGS THAT DON’T RENDER A method

    of declaring inert DOM subtrees in HTML that can be instantiated later via JavaScript <template>...</template>
  6. <wc-shadow> </wc-shadow> Shadow DOM Provides encapsulation of CSS, JavaScript and

    templates in Web Components. Prevents style leakage by setting a boundary DOM Trees