# immutable-dom

> Lock any HTML DOM Element 🔐

Latest version **0.1.0** (published 2021-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install immutable-dom
pnpm add immutable-dom
yarn add immutable-dom
bun add immutable-dom
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-01-29 |
| First published | 2021-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Gianluca Guarini https://github.com/GianlucaGuarini |
| Maintainers | gianlucaguarini |

## Links

- npm: https://www.npmjs.com/package/immutable-dom
- Repository: https://github.com/gianlucaguarini/immutable-dom
- Homepage: https://github.com/gianlucaguarini/immutable-dom#readme
- Issues: https://github.com/gianlucaguarini/immutable-dom/issues
- npm.io page: https://npm.io/package/immutable-dom

## Recent versions

- 0.1.0 (latest) — 2021-01-29
- 0.0.2 — 2021-01-29
- 0.0.1 — 2021-01-29

## README

# immutable-dom

Lock any HTML DOM Element 🔐

This script detects attempts to modify your HTML structure and content. 
It disables changes from internal or external sources (like Devtools).

## Motivation

Your Application HTML can be [modified by scammers](https://www.youtube.com/watch?v=R1etkjUN6Ak) and or third party scripts.

I wanted to create simple script that locks safely your application HTML making it immutable.

## Installation

```bash
npm i immutable-dom
```

## Usage

```js
import {lock} from 'immutable-dom'

// your application html can be no longer modified
const unlock = lock(document.documentElement)

// unlock your application
unlock()
```

[Check the demo](https://plnkr.co/edit/rjaeeMWr1vlIY4mI?open=lib%2Fscript.js)

## TODO

- [] Add unit test

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