UNPKG

domsubi

Version:

A Virtual-DOM Library for JavaScript

39 lines (38 loc) 1.32 kB
import { Cell } from "sodiumjs"; import { EventStreamMap, NodeSource } from "./types"; declare type AttrCells = { [key: string]: Cell<string>; }; declare type CustomCSSVariables = { [key: string]: string | Cell<string>; }; export declare abstract class jshtmlElement extends HTMLElement { static observedShadowEvents: string[]; static observedAttributes: string[]; /** * ShadowRootのコンテンツとしてmountされるjshtmlソース。 */ abstract shadowSource: NodeSource; /** * ShadowRootでlistenするEventのStream。 */ shadowEvents: EventStreamMap; /** * AttributesのCell。static observedAttributesで指定した属性のCell。 */ attrCells: AttrCells; /** * CSSカスタムプロパティのリスト。ShadowDOMのスタイルで使いたい変数を設定する。変数名であることを示す二重ハイフン(--)は不要。 */ cssVars?: CustomCSSVariables; /** * connected / disconnectedに合わせてShadowRootからmount / unmountする。 */ private _mount?; private _unmount; constructor(); connectedCallback(): any; disconnectedCallback(): void; attributeChangedCallback(n: string, old: string, v: string): void; } export {};