JSFiddle - React, Tailwind, and code Playground

by Aggre _--

HTML

<x-app c='a' id=app></x-app>

CSS

body {
	background: black;
}

JavaScript

window.customElements.define('x-app', class extends HTMLElement {
	
	static get observedAttributes() {
		return undefined
	}
	
	attributeChangedCallback(name, old, next) {
		console.log({name, old, next})
	}
})

document.getElementById('app').attributeChangedCallback('c', '1', null)