From eda3bd59b2284fd084a06be1664c79e2f7fa87e1 Mon Sep 17 00:00:00 2001 From: webreflection Date: Tue, 14 Nov 2023 19:09:56 +0100 Subject: [PATCH] no misleading default --- README.md | 2 +- test/coverage.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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/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);