Skip to content

niwaringo/lazy-exec

Repository files navigation

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

About

To wait for the execution until the specified DOM appears.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published