/immutable-dom

Lock any HTML DOM Element 🔐

Primary LanguageJavaScript

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 and or third party scripts.

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

Installation

npm i immutable-dom

Usage

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

TODO

  • [] Add unit test