JSFiddle - React, Tailwind, and code Playground

by amindunited

HTML

<my-tag></my-tag>

JavaScript

class MyTag extends HTMLElement {
    constructor() {
      super();
      console.log('constructor');
    }
    connectedCallback () {
      this.innerHTML = '<h2>did you get this?</h2>';
    }
  }

  customElements.define('my-tag', MyTag);
  console.log('what?');