xpath-ts2
Version:
DOM 3 and 4 XPath 1.0 implementation for browser and Node.js environment with support for typescript 5.
85 lines • 2.5 kB
JavaScript
// tslint:disable:member-ordering
Object.defineProperty(exports, "__esModule", { value: true });
exports.XPathNamespace = void 0;
// @ts-ignore
class XPathNamespace {
static XPATH_NAMESPACE_NODE = 13;
isXPathNamespace = true;
ownerDocument;
nodeName = '#namespace';
prefix;
localName;
namespaceURI;
nodeValue;
ownerElement;
nodeType;
constructor(pre, ns, p) {
this.isXPathNamespace = true;
this.ownerDocument = p.ownerDocument;
this.nodeName = '#namespace';
this.prefix = pre;
this.localName = pre;
this.namespaceURI = ns;
this.nodeValue = ns;
this.ownerElement = p;
this.nodeType = XPathNamespace.XPATH_NAMESPACE_NODE;
}
toString() {
return '{ "' + this.prefix + '", "' + this.namespaceURI + '" }';
}
/**
* Unused and unsupported properties
*/
baseURI = undefined;
childNodes = undefined;
firstChild = undefined;
isConnected = undefined;
lastChild = undefined;
nextSibling = undefined;
parentElement = undefined;
parentNode = undefined;
previousSibling = undefined;
textContent = undefined;
appendChild = unsupported;
cloneNode = unsupported;
compareDocumentPosition = unsupported;
contains = unsupported;
getRootNode = unsupported;
hasChildNodes = unsupported;
insertBefore = unsupported;
isDefaultNamespace = unsupported;
isEqualNode = unsupported;
isSameNode = unsupported;
lookupNamespaceURI = unsupported;
lookupPrefix = unsupported;
normalize = unsupported;
removeChild = unsupported;
replaceChild = unsupported;
ATTRIBUTE_NODE = 2;
CDATA_SECTION_NODE = 4;
COMMENT_NODE = 8;
DOCUMENT_FRAGMENT_NODE = 11;
DOCUMENT_NODE = 9;
DOCUMENT_POSITION_CONTAINED_BY = 16;
DOCUMENT_POSITION_CONTAINS = 8;
DOCUMENT_POSITION_DISCONNECTED = 1;
DOCUMENT_POSITION_FOLLOWING = 4;
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
DOCUMENT_POSITION_PRECEDING = 2;
DOCUMENT_TYPE_NODE = 10;
ELEMENT_NODE = 1;
ENTITY_NODE = 6;
ENTITY_REFERENCE_NODE = 5;
NOTATION_NODE = 12;
PROCESSING_INSTRUCTION_NODE = 7;
TEXT_NODE = 3;
addEventListener = unsupported;
dispatchEvent = unsupported;
removeEventListener = unsupported;
}
exports.XPathNamespace = XPathNamespace;
function unsupported() {
throw new Error('Unsupported');
}
//# sourceMappingURL=xpath-namespace.js.map
;