rimmel
Version:
A Streams-Oriented UI library for the Rx.Observable Universe
26 lines • 898 B
TypeScript
import type { RimmelComponent } from './types/internal';
export type CustomElementDefinition = {
observedAttributes?: string[];
render?: (this: HTMLElement, props: Record<string, any>) => void;
connectedCallback?: (this: HTMLElement) => void;
disconnectedCallback?: (this: HTMLElement) => void;
attributeChangedCallback?: (this: HTMLElement, name: string, oldValue: string, newValue: string) => void;
};
/**
* Register a Rimmel Component as a Custom Element in the DOM
*
* ## Examples
*
* ### Create a simple "Hello, World" web component
* ```ts
* import { rml, RegisterElement } from 'rimmel';
*
* RegisterElement('custom-element', () => {
* return rml`
* <h1>Hello, world</h1>
* `;
* }
* ```
**/
export declare const RegisterElement: (tagName: string, component?: RimmelComponent, initFn?: Function) => void;
//# sourceMappingURL=custom-element.d.ts.map