初始化
This commit is contained in:
17
uni_modules/UniDevTools/node_modules/licia/loadCss.js
generated
vendored
Normal file
17
uni_modules/UniDevTools/node_modules/licia/loadCss.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user