RegularElements

artydev

artydev

Posted on October 16, 2020

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
💖 💪 🙅 🚩
artydev
artydev

Posted on October 16, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related