i'm creating a popup stenciljs component.
File structure:
- popup-element
- src
- utils
- popup-manager
- components
- popup-element
- popup-element.tsx
- popup-element
- index.html
- utils
- ...
- src
Now i try to insert component to DOM from function: popup-manager.ts
export function createMiniNotification(notificationContent: string, mountTarget: HTMLElement = document.body): HTMLElement {
const notify = document.createElement('popup-element');
notify.setAttribute('content', notificationContent);
mountTarget.appendChild(notify);
}
How can I use this function in index.html (in development mode)?