1.0.1 • Published 9 years ago

lazy-exec v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 years ago

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

9 years ago

1.0.0

9 years ago