Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
/ async-dom Public archive

Asynchronously call a method after the DOM has changed

License

Notifications You must be signed in to change notification settings

ueno-llc/async-dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');
});

About

Asynchronously call a method after the DOM has changed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published