lazy-exec

1.0.1 • Public • Published

To wait for the execution until the specified DOM appears.

INSTALL

npm && browserify

npm install lazy-exec
var lazyExec = require("lazy-exec");

html script

download hrere.

<script src="path/to/lazyexec.standalone.js"></script>

USAGE

lazyExec("script[src^='https://code.jquery.com/']", function(error, element) {
  // element is HTMLScriptElement
  assert.strictEqual(element.src, "https://code.jquery.com/jquery.js");
});
 
var jquery = document.createElement("script");
jquery.src = "https://code.jquery.com/jquery.js";
document.head.appendChild(jquery);

Readme

Keywords

none

Package Sidebar

Install

npm i lazy-exec

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • niwaringo