1.0.2 • Published 7 years ago

load-external v1.0.2

Weekly downloads
100
License
MIT
Repository
github
Last release
7 years ago

Easily load external js and css files (cross-browser).

var loadExternal = require('load-external');

loadExternal('https://js.stripe.com/v2/', function() {
    // alert('Stripe is loaded!');
});

loadExternal('https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.css', function() {
    // alert('CSS Reset is loaded & applied!');
});

LoadExternal does its best to determine the type of file you wish to load, but you can also explicitly define the mode (currently accepts js or css):

loadExternal('https://js.stripe.com/v2/', 'js', function() {
    // alert('Stripe is loaded!');
});
1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago