UNPKG

speech-rule-engine

Version:

A standalone speech rule engine for XML structures, based on the original engine from ChromeVox.

21 lines (20 loc) 770 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.xpath = exports.document = exports.xmldom = void 0; const Xmldom = require("@xmldom/xmldom"); const wgx = require("wicked-good-xpath"); exports.xmldom = Xmldom; exports.document = new exports.xmldom.DOMImplementation().createDocument('', ''); const install = (wgx === null || wgx === void 0 ? void 0 : wgx.install) || window.wgxpath.install; const Xpath = (function () { const win = { document: {}, XPathResult: {} }; install(win); win.document.XPathResult = win.XPathResult; return win.document; })(); exports.xpath = { currentDocument: exports.document, evaluate: Xpath.evaluate, result: Xpath.XPathResult, createNSResolver: Xpath.createNSResolver };