This is a package that adds history to linkedom.
Install peer dependencies:
pnpm add history linkedom
Then install this module
pnpm install linkedom-history
Or, run npm install
or yarn add
, based on your package manager. Use with a version of likedom
and history
as follows:
import { parseHTML } from "linkedom-history";
const doc = parseHTML("<body></body>").document;
const { history, location } = doc.defaultView;
The parseHTML
function acts in place of the function of the same name from linkedom
. The linkedom-history
also provides renderElement
and resetDocument
for testing React
libraries.
The published copy lives at linkedom-history on GitHub. Make any pull request against the main branch.
I build and test with pnpm. I've tried npm
, yarn@1
, yarn@berry
, but The uvu
testing library currently recommendeds pnpm
.