GithubHelp home page GithubHelp logo

akrappe / webcomponent-examples Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 570 KB

This is a living techguide for Web Components

License: MIT License

HTML 33.15% JavaScript 52.92% TypeScript 10.30% CSS 3.63%

webcomponent-examples's Introduction

Web Components Introduction and Examples

This is a collection of Web Component examples.
The intention of this repo is to give you an introduction into Web Components, there characteristics and some best practices.

All features and functions of those examples are documented as code comments. So pretty much every undocumented line of code was documented in a prior or easier chapter.

Most examples are written in ES6. The simple examples mostly show only a single feature and are not intended to run in all possible browsers! Those examples are working great in current Chrome releases. Production environments usually need to run bundlers like Webpack...

For a short summary and overview of the Web Component Specification see MDN Web Components

Installation

Even though all distribution folders are committed in this repository you might want to play around with the code examples.

Run yarn install to install all dependencies first.

See scripts property in package.json and run tasks as needed. All build tasks are number by there chapter prefix number, e.g. yarn build-13.

Known limitiations / drawbacks

  • Because most Browsers do not fully support the Web Components specifications we need to use polyfills

  • ES5 vs Native Custom Elements

    • ES5-style classes don't work with native Custom Elements
    • All constructors in an inheritance hierarchy must be ES5-style
  • Sharing of Styles into Shadow DOM is not (wisely) possible today (February 2018)

Link collection

General Documentation

Styling

Templating

Frameworks

Tools

Workarounds / Shims

webcomponent-examples's People

Contributors

janrembold avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.