diff --git a/README.md b/README.md index bdde440..d0b7e82 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ * `uhtml` as default `{ Hole, render, html, svg, attr }` with smart auto-keyed nodes - read [keyed or not keyed](https://webreflection.github.io/uhtml/#tag) to know more * `uhtml/keyed` with extras `{ Hole, render, html, svg, htmlFor, svgFor, attr }`, providing keyed utilities - read [keyed or not keyed](https://webreflection.github.io/uhtml/#tag) to know more * `uhtml/node` with *same default* exports but it's for *one-off* nodes creation only so that no cache or updates are available and it's just an easy way to hook *uhtml* into your existing project for DOM creation (not manipulation!) - * `uhtml/init` which returns a default `document => uhtml/keyed` utility that can be bootstrapped with [LinkeDOM](https://github.com/WebReflection/linkedom), [JSDOM](https://github.com/jsdom/jsdom), or *Workers* support + * `uhtml/init` which returns a `document => uhtml/keyed` utility that can be bootstrapped with [LinkeDOM](https://github.com/WebReflection/linkedom), [JSDOM](https://github.com/jsdom/jsdom), or *Workers* support **uhtml/init example** diff --git a/rollup/init.cjs b/rollup/init.cjs index 8d0a087..5f94fa9 100644 --- a/rollup/init.cjs +++ b/rollup/init.cjs @@ -6,6 +6,7 @@ const uhtml = readFileSync(init).toString(); writeFileSync(init, ` // ⚠️ WARNING - THIS FILE IS AN ARTIFACT - DO NOT EDIT + /** * @param {Document} document * @returns {import("./keyed.js")} diff --git a/test/coverage.js b/test/coverage.js index 600dc21..9ed2083 100644 --- a/test/coverage.js +++ b/test/coverage.js @@ -2,8 +2,7 @@ const {DOMParser, HTMLElement} = require('linkedom'); const document = (new DOMParser).parseFromString('', 'text/html'); const { prototype } = document.createRange().constructor; -const { selectNode } = prototype; -prototype.selectNodeContents = selectNode; +prototype.selectNodeContents = prototype.selectNode; const { render, html, svg, htmlFor } = require('../cjs/init.js')(document);