Last active
April 1, 2023 09:18
-
-
Save mdmoinulhossain/d1f0f3fea001ec6c75c4eca93400ba8a to your computer and use it in GitHub Desktop.
Html Components using JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ComponentName extends HTMLElement { | |
connectedCallback() { | |
this.innerHTML = `Here your HTML`; | |
} | |
} | |
customElements.define("comp-imple", ComponentName); | |
// <comp-imple></comp-imple> - into where it shown with script tag link-up. compomrmt name should have small letters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment