# jsx-alone-dom-dom

> A minimal DOM implementation that jsx-alone-dom supports

Latest version **0.0.5** (published 2019-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsx-alone-dom-dom
pnpm add jsx-alone-dom-dom
yarn add jsx-alone-dom-dom
bun add jsx-alone-dom-dom
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-09-28 |
| First published | 2019-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 128.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Sebastian Gurin |
| Maintainers | cancerberosgx |
| Keywords | without react, TypeScript, JavaScript, JSX, TSX, React |

## Links

- npm: https://www.npmjs.com/package/jsx-alone-dom-dom
- Repository: https://github.com/cancerberoSgx/jsx-alone
- Issues: https://github.com/cancerberoSgx/jsx-alone/issues
- npm.io page: https://npm.io/package/jsx-alone-dom-dom

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2019-09-28

## README

# jsx-alone-dom-dom

A minimal DOM implementation that jsx-alone-dom supports

**IMPORTANT** THis is a very incomplete DOM implementation, very minimal, and not aim to be complete, just to provide DOM API that jsx-alone-dom implementation uses so it can be run without a DOM, like in node.js or web workers. 


## Usage

```sh
npm install -D jsx-alone-dom-dom
```

In a webworker or node.js without an existing DOM:

```ts
import { install } from '../document';

install()

const d = document.createElement('div')
d.setAttribute('id', 'i1')
document.body.appendChild(d)

const c = document.createElement('span')
c.setAttribute('class', 'ccc')
d.appendChild(c)
c.appendChild(document.createTextNode('This was generated using \n'+
  'jsx-alone-dom-dom little DOM  implementation')

console.log(document.body.outerHTML)

```

In an existing DOM, just for fun:

```ts
import { MDocument } from '../document';

const doc = new MDocument()

const d = doc.createElement('div')
d.setAttribute('id', 'i1')
doc.body.appendChild(d)

const c = doc.createElement('span')
c.setAttribute('class', 'ccc')
d.appendChild(c)
c.appendChild(doc.createTextNode('This was generated using \n'+
  'jsx-alone-dom-dom little DOM  implementation')

console.log(doc.body.outerHTML)
```


## Motivation, thoughts

This is not even for testing jsx-alone-dom (we already use jsdom), here som motivation

* run tests in the browser that run on a web worker. 
* render dom in a web worker to update the real DOM faster / diff / etc...

---
_Source: https://npm.io/package/jsx-alone-dom-dom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
