@skyrpex/waitfor
v1.0.3
Published
-
Downloads
2
Readme
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"));