nxkit
Version:
This is a collection of tools, independent of any other libraries
39 lines (38 loc) • 1.84 kB
TypeScript
import { Node, NODE_TYPE, NodeList, DocumentFragment, Text, Comment, Attribute, CDATASection, ProcessingInstruction, EntityReference } from './node';
import { Element } from './element';
export declare class Document extends Node {
readonly nodeName = "#document";
readonly nodeType = NODE_TYPE.DOCUMENT_NODE;
readonly childNodes: NodeList;
readonly ownerDocument: Document;
doctype: Node | null;
_documentElement: Element | null;
_inc: number;
get documentElement(): Element | null;
/**
* constructor function
* @constructor
* @param {String} namespaceURI
* @param {String} qualifiedName
* @param {tesla.xml.DocumentType} doctype
*/
constructor(namespaceURI?: string, qualifiedName?: string, doctype?: Node);
load(text: string): Document;
insertBefore(newChild: Node, refChild: Node): Node;
removeChild(oldChild: Node): Node | null;
importNode(importedNode: Node, deep?: boolean): null;
getElementById(id: string): null;
getElementsByTagName(name: string): NodeList;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList;
createElement(tagName: string): Element;
createDocumentFragment(): DocumentFragment;
createTextNode(data: string): Text;
createComment(data: string): Comment;
createCDATASection(data: string): CDATASection;
createProcessingInstruction(target: string, data: string): ProcessingInstruction;
createAttribute(name: string, value: string): Attribute;
createEntityReference(name: string, value?: string): EntityReference;
createElementNS(namespaceURI: string, qualifiedName: string): Element;
createAttributeNS(namespaceURI: string, qualifiedName: string, value: string): Attribute;
toJSON(): Dict<string> | null;
}