<ceb/>
custom-element-builder
<ceb/>
is a library helping to develop Custom Elements (v0).
Its core is a builder which executes others builders.
By this way, <ceb/>
is natively opened to extensions and builders easily sharable.
Obviously, <ceb/>
exposes builders and helpers handling the common needs:
- property
- attribute
- events
- delegation to child element (attribute, property and method)
- templating
- event dispatching
- type checking
- etc.
A ceb's playground is available showing how-to build simple and more complex Custom Elements.
Quick overview
; // create a fresh element builderlet builder = ; builder; builder; // build and register the custom element let CebExample = builder; // export the class of the custom element;
// create an instance of ceb-examplelet cebExample = document; // by default foo is 0console // => 0 cebExample;console // => now it's: 1 cebExample;console // => and finally: 3 cebExample; // => dispatch the custom event 'bar' with the detail 'foo'
Download
<ceb/>
is available from npm and bower.
From npm:
npm install ceb
From bower:
bower install ceb
<ceb/>
can also be fetched from a unpkg, a CDN:
License
Released under the MIT license.