You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
387 B
17 lines
387 B
var noop = require('./noop');
|
|
exports = function(src, cb) {
|
|
cb = cb || noop;
|
|
var link = document.createElement('link');
|
|
link.rel = 'stylesheet';
|
|
link.type = 'text/css';
|
|
link.onerror = function() {
|
|
cb(false);
|
|
};
|
|
link.onload = function() {
|
|
cb(true);
|
|
};
|
|
link.href = src;
|
|
document.head.appendChild(link);
|
|
};
|
|
|
|
module.exports = exports;
|
|
|