jxdnsong
2020-10-23 a7929e6b3ec9ac17233f39e55a2b8ac63ea75f42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
define([ 'require' ], function (require) {
    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('../../css/dgrid.css');
            document.getElementsByTagName('head')[0].appendChild(link);
 
            var interval = setInterval(function () {
                if (link.style) {
                    clearInterval(interval);
                    loaded();
                }
            }, 15);
        }
    };
});