DEV Community

Cover image for RegularElements
artydev
artydev

Posted on

RegularElements

Quote from site: "Everything I love about Custom Elements made available for any node, and through CSS selectors.
No Custom Elements, no Shadow DOM, and no polyfills are needed.
"

You can test it here : RegElt

<button class="hi-five">
    Hi Five One
</button>
<button class="hi-five">
    Hi Five Two
</button>
Enter fullscreen mode Exit fullscreen mode
import {define} from 'regular-elements';

define('.hi-five', {
  connectedCallback() {
    this.innerHTML = ' 🖐 ' + this.innerHTML;
  }
});
Enter fullscreen mode Exit fullscreen mode

Top comments (0)