JSFiddle - React, Tailwind, and code Playground
by Sir_Pepe
HTML
<!-- Funktioniert aktuell nur in Chrome, weil
hier keine Polyfills eingebunden sind -->
<a is="x-foo" href="https://www.google.de">Google</a>
JavaScript
document.registerElement('x-foo', {
prototype: Object.create(HTMLAnchorElement.prototype, {
methodBar:{
value: function(){
console.log('Hallo Welt!');
}
}
}),
extends: 'a'
});