shady-dom

Shadow DOM-like encapsulation


License
BSD-3-Clause
Install
npm install shady-dom@0.0.0

Documentation

shady-dom

Shady under a tree, not sketchy.

import { registerElement } from 'shady-dom';

@registerElement()
class XFoo extends window.HTMLElement {
  createdCallback() {
    const root = this.createShadyRoot();
    root.innerHTML = '<a href="#">I\'m Shady</a><content></content>';
  }
}

Credit

The "shady-dom" inspired by the awesome folks over at Polymer