@salla.sa/twilight-components
Version:
Salla Web Component
29 lines (26 loc) • 902 B
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { r as registerInstance, h, H as Host, a as getElement } from './index-BQQ2x3w_.js';
const SallaHook = class {
constructor(hostRef) {
registerInstance(this, hostRef);
}
/**
* Mounts a given HTML element into the hook position.
* @param element The element to inject.
*/
async mount(element) {
this.host.before(element);
}
render() {
return h(Host, { key: 'a887790b6c3fa466e88b0b1c90fda502f3aca812' });
}
async componentDidLoad() {
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
await Salla.hooks.registerComponent('salla-hook', this);
}
get host() { return getElement(this); }
};
SallaHook.style = ":host {\n all: unset;\n display: none; /* marker only */\n }";
export { SallaHook as salla_hook };