nxkit
Version:
This is a collection of tools, independent of any other libraries
31 lines (30 loc) • 1.52 kB
TypeScript
import { Node, NodeList, NODE_TYPE, LiveNodeList, Attribute } from './node';
import * as doc from './document';
import { NamedNodeMap } from './named_node_map';
export declare function visitNode(node: Node, callback: (node: Node) => boolean): boolean;
export declare class Element extends Node {
readonly nodeType = NODE_TYPE.NODE_NODE;
readonly childNodes: NodeList;
readonly tagName: string;
readonly attributes: NamedNodeMap;
readonly namespaceMap?: Dict<string>;
get nodeName(): string;
constructor(doc: doc.Document, tagName: string);
hasAttribute(name: string): boolean;
getAttribute(name: string): string;
setAttribute(name: string, value: string): void;
getAttributeNode(name: string): Attribute | null;
setAttributeNode(newAttr: Attribute): void;
removeAttributeNode(oldAttr: Attribute): void;
removeAttribute(name: string): void;
hasAttributeNS(namespaceURI: string, localName: string): boolean;
getAttributeNS(namespaceURI: string, localName: string): string;
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
getAttributeNodeNS(namespaceURI: string, localName: string): Attribute | null;
setAttributeNodeNS(newAttr: Attribute): void;
removeAttributeNS(namespaceURI: string, localName: string): void;
getElementsByTagName(name: string): LiveNodeList;
getElementsByTagNameNS(namespaceURI: string, localName: string): LiveNodeList;
get innerXml(): string;
set innerXml(xml: string);
}