happy-dom 20.x
Use happy-dom ^20.0.0 as a headless DOM/browser implementation in standalone Bun or Node scripts, with v20 security defaults and lifecycle cleanup in mind.
- For
happy-dom@20.14.0- Verified
- 2026-09-07, 5 examples executed
- Package
@modootoday/pmcp-happy-dom@20.0.0
What it covers
- Scope
- `Window`: create and manipulate a DOM
- JavaScript evaluation is disabled by default in v20
- `Browser` and pages
- `GlobalWindow`
- Finding the owning window with `PropertySymbol`
- Test-environment integrations are separate
- Server rendering is a separate package
- Not covered
One example from this skill
This is the skill's own text, not a summary of it. It runs: that is what verifying means here.
import { strict as assert } from 'node:assert';
import { Window } from 'happy-dom';
const window = new Window({ url: 'https://localhost:8080' });
const document = window.document;
document.body.innerHTML = '<div class="container"></div>';
const container = document.querySelector('.container');
assert.ok(container);
const button = document.createElement('button');
container.appendChild(button);
assert.equal(document.body.innerHTML, '<div class="container"><button></button></div>');
assert.equal(window.location.href, 'https://localhost:8080/');
await window.happyDOM.abort();
window.close();
What it did in the sandbox
Verifying this skill meant installing the package and running code against it with no route out. Nothing was observed. The full ledger lists every package examined, including the ones that never became a skill.
Nothing observed is not a finding of safety. It means one run, under one policy, produced nothing to report.
Getting it
With a subscription:
npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-happy-dom
It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.