0.0.3 • Published 10 years ago

script-utils v0.0.3

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

script

Script utils to create script elements, add and remove them from <head>

Installation

npm install script-utils

In the browser:

<script src="script-utils-browser.js"></script>

Usage

var script = require("script-utils");

// create a new script element with an onload callback
var newScript = script.create("source/to/file", function onload() {
	// do something when script is loaded;
}, this);

// Append the script to &lt;head&gt;
script.append(newScript);

// Remove script from &lt;head&gt;
script.remove(newScript);

Licence

MIT

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago