# redraw-dom

> Forces the browser to synchronously redraw a DOM node.

Latest version **1.0.0** (published 2015-07-02) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2015-07-02 |
| First published | 2015-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | ayamflow |
| Keywords | dom, redraw, refresh, repaint, reflow |

## Links

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

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-07-02

## README

redraw-dom
===

Forces the browser to synchronously redraw a DOM node.

Anytime you've got some weird bug with the browsing not updatig the look of your element, you might need to force a repaint/redraw. This snippet will do the trick!

Before using this, you might want to try the `backface-visibility: hidden;` hack or using `will-change` (as seen [here](https://dev.opera.com/articles/css-will-change-property/)) since this is the "official" way to go.

## API

- redraw(el, display)
redraw the `el` element (must be a DOM node). `display` is the display style you want restored on the element (defaults to `block`).

## Example
```
var redraw = require('redraw-dom');

var el = document.querySelector('.el-redraw');
redraw(el);

el.style.display = 'inline';
redraw(el, 'inline'); // Preserve the inline display

```

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