1.0.1 • Published 8 years ago

async-dom v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

async-dom

Asynchronously call a method after the DOM has changed. It is useful when animating with css classes.

Installation

npm install async-dom

Usage

import async, { cancel } from 'async-dom';

const element = document.querySelector('.my-node');

element.classList.add('will-show');
async(() => {
  element.classList.remove('will-show');
  element.classList.add('did-show');
});