uhtml
Version:
A micro HTML/SVG render
87 lines (86 loc) • 3.08 kB
TypeScript
export { initSsr as default };
export type Child = string | Node;
export type Attribute = Attribute;
export type DOMLevel0Listener = Function | null;
/** @type {(content?: string, mimeType?: string) => import("./keyed.js")} */
declare var initSsr: (content?: string, mimeType?: string) => typeof import("./keyed.js");
declare class Node {
constructor(node: any, svg: any);
D: any;
n: any;
s: any;
d: boolean;
onopentag(name: any, attributes: any): void;
onclosetag(): void;
oncomment(text: any): void;
ontext(text: any): void;
oncdatastart(): void;
oncdataend(): void;
}
declare const Attribute_base: {
new (type: any, owner: any): {
/** @type {import("./parent.js").default?} */
readonly parentNode: any | null;
/** @type {ELEMENT_NODE | ATTRIBUTE_NODE | TEXT_NODE | COMMENT_NODE | DOCUMENT_NODE | DOCUMENT_FRAGMENT_NODE} */
readonly nodeType: 1 | 2 | 3 | 8 | 9 | 11;
/** @type {import("./document.js").default?} */
readonly ownerDocument: any | null;
/** @type {boolean} */
readonly isConnected: boolean;
/** @type {import("./element.js").default?} */
readonly parentElement: any | null;
/** @type {Node?} */
readonly previousSibling: /*elided*/ any | null;
/** @type {import("./element.js").default?} */
readonly previousElementSibling: any | null;
/** @type {Node?} */
readonly nextSibling: /*elided*/ any | null;
/** @type {import("./element.js").default?} */
readonly nextElementSibling: any | null;
/** @type {Node[]} */
readonly childNodes: /*elided*/ any[];
/**
* @param {...import("./node.js").Child} values
*/
after(...values: import("./node.js").Child[]): void;
/**
* @param {...import("./node.js").Child} values
*/
before(...values: import("./node.js").Child[]): void;
remove(): void;
/**
* @param {...Child} values
*/
replaceWith(...values: Child[]): void;
};
ELEMENT_NODE: number | undefined;
ATTRIBUTE_NODE: number | undefined;
TEXT_NODE: number | undefined;
COMMENT_NODE: number | undefined;
DOCUMENT_NODE: number | undefined;
DOCUMENT_FRAGMENT_NODE: number | undefined;
};
/** @typedef {Attribute} Attribute */
declare class Attribute extends Attribute_base {
constructor(nodeName: any, nodeValue?: string, owner?: null);
set value(any: string);
/** @type {string} */
get value(): string;
/** @type {import("./element.js").default?} */
get ownerElement(): any | null;
/** @type {string} */
get name(): string;
/** @type {string} */
get localName(): string;
/** @type {string} */
get nodeName(): string;
/** @type {string} */
get nodeValue(): string;
toString(): any;
[ownerElement]: any;
[name]: any;
[value]: string | undefined;
}
declare const ownerElement: unique symbol;
declare const name: unique symbol;
declare const value: unique symbol;