UNPKG

@progress/kendo-e2e

Version:

Kendo UI end-to-end test utilities.

17 lines 639 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseHtml = parseHtml; /** * Parse an HTML string into a Document, using the global DOMParser when * available (e.g. inside a Jest jsdom environment) and falling back to * the `jsdom` package in pure Node.js. */ function parseHtml(html) { if (typeof DOMParser !== 'undefined') { return new DOMParser().parseFromString(html, 'text/html'); } // eslint-disable-next-line @typescript-eslint/no-require-imports const { JSDOM } = require('jsdom'); return new JSDOM(html).window.document; } //# sourceMappingURL=parse-html.js.map