Last active
November 8, 2024 13:51
-
-
Save pbochynski/79fe7f07b404cecad750d4d7415f3fda to your computer and use it in GitHub Desktop.
Service Manager plugin
This file contains hidden or 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 MyComponent1 extends HTMLElement { | |
| connectedCallback() { | |
| this.innerHTML = '' | |
| // create elements programmatically | |
| const button = document.createElement('ui5-button'); | |
| button.textContent = 'Button 2'; | |
| this.appendChild(button); | |
| button.addEventListener('click', () => { | |
| alert('Button 2 clicked'); | |
| }) | |
| } | |
| } | |
| if (!customElements.get('my-component-1')) { | |
| customElements.define('my-component-1', MyComponent1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment