23 lines
677 B
JavaScript
23 lines
677 B
JavaScript
define([ 'require' ], function (require) {
|
|
console.error('add css');
|
|
return {
|
|
|
|
// Expose this module as an AMD plugin which will wait until the
|
|
// link element has loaded the stylesheet.
|
|
// (This uses least-common-denominator logic from xstyle/core/load-css.)
|
|
load: function (id, parentRequire, loaded) {
|
|
var link = document.createElement('link');
|
|
link.rel = 'stylesheet';
|
|
link.href = require.toUrl('../grid.css');
|
|
console.error('addcss ' +link.href);
|
|
document.getElementsByTagName('head')[0].appendChild(link);
|
|
var interval = setInterval(function () {
|
|
if (link.style) {
|
|
clearInterval(interval);
|
|
loaded();
|
|
}
|
|
}, 15);
|
|
}
|
|
};
|
|
});
|