Web Components

Polymer Project

&

WHAT ARE WEB COMPONENTS?

Web Components enable truly encapsulated and reusable components for the web.

ALL W3c Working DRAFTS

Custom Elements

*comparable to AngularJS directives.

Naming rules:

Custom Elements need to have a hyphen in the name of their element tag. ie: <katz-component> to avoid future conflicts with newly added HTML elements.

Extension usage:

<div is="katz-component">

HTML Imports

Resolving Dependencies

HTML imports that include the same javascript assets don't need to worry about them being downloaded/executed more than once.

Scripts from imports will also be deferred unless specified as asynchronous.

Reducing Network Requests

HTML imports that include the same javascript assets don't need to worry about them being downloaded/executed more than once.

We can also Vulcanize our web components prior to importing them.

HTML Imports (continued)

Shadow DOM

Templates

... generates output for Custom Elements

Parsed as markup but doesn't fetch contents until instantiated.

Additional information:

[ exampleS / Polymer ]

Keep learning:

Polymer

Other WebComponent Libraries

WebComponents

Web Components

By Eric Katz

Web Components

This presentation is in progress. Presented internally @ CardinalSolutions Front End Special Interest Group

  • 1,281