1.0.3 • Published 9 years ago

@skyrpex/waitfor v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

Wait For

A small library that provides an utility method to wait for DOM elements.

Installation

npm install @skyrpex/waitfor --save

Usage

import waitFor from "@skyrpex/waitfor";
waitFor(".container")
	.then($container => $container.append("<h1>Hello</h1>"));
import waitFor from "@skyrpex/waitfor";
let parent = document.querySelector(".container");
waitFor("h1", { parent })
	.then($h1 => $h1.html("Hello"));