# watchmydom

> **A Javascript library to watch the DOM changes in a single callback**

Latest version **1.0.7** (published 2020-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install watchmydom
pnpm add watchmydom
yarn add watchmydom
bun add watchmydom
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-10-30 |
| First published | 2020-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 38.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | saifKeralite |
| Maintainers | saifkeralite |

## Links

- npm: https://www.npmjs.com/package/watchmydom
- Homepage: https://saifkeralite.github.io/watchmydom/
- npm.io page: https://npm.io/package/watchmydom

## Recent versions

- 1.0.7 (latest) — 2020-10-30
- 1.0.6 — 2020-10-27
- 1.0.4 — 2020-10-27
- 1.0.3 — 2020-10-26
- 1.0.2 — 2020-10-26
- 1.0.1 — 2020-10-26
- 1.0.0 — 2020-10-26

## README

# watchmydom

**A Javascript library to watch the DOM changes in a single callback**

# Demo

[Click here](https://saifkeralite.github.io/watchmydom/) to see the detailed demo.

# Download

Minified script file has been added in the `build` folder.

# Installation/Usage

1. Add the library script into your page

```javascript
<script src="watchmydom.min.js"></script>
```

2. Initialize `watchMyDom` object in your custom script. You can use a class name, id or a tagName.

```javascript
var watchIt = new watchMyDom("#div-id");
```

3. Use `watch()` method to start watching.

```javascript
watchIt.watch(function (result, info) {
	//Callback
});
```

3. Use `stop()` method to stop watching.

```javascript
watchIt.stop();
```

# npm Installation

1. Install the package

   ```javascript
   npm i watchmydom
   ```

2. Use the module as shown below.

   ```javascript
   var watchmydom = require("watchmydom");
   var domResults = new watchmydom(".dom-results");
   ```

# Methods

| Methods | Usage                      |
| ------- | -------------------------- |
| watch() | Use this to start watching |
| stop()  | Use this to stop watching  |

# Callbacks

You can see the DOM updates/changes in the watch() calllback function.

| Parameters | Usage                 |
| ---------- | --------------------- |
| result     | Sorted observations   |
| info       | Complete observations |

# License

MIT

# Code

Saif

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