mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(package) add domtokenlist-shim from npm
This commit is contained in:
parent
1ce28fd500
commit
d3cbd442e7
9 changed files with 12 additions and 13245 deletions
|
|
@ -6,7 +6,9 @@ const itype = require('itype/legacy');
|
|||
const Emitify = require('emitify/legacy');
|
||||
const inherits = require('inherits');
|
||||
const rendy = require('rendy/legacy');
|
||||
const wraptile = require('wraptile/legacy');
|
||||
const exec = require('execon');
|
||||
|
||||
const Images = require('./dom/images');
|
||||
const {
|
||||
registerSW,
|
||||
|
|
@ -185,16 +187,14 @@ function CloudCmdProto(Util, DOM) {
|
|||
exec.with(CloudCmd.route, location.hash),
|
||||
], noop);
|
||||
|
||||
const addPrefix = (a) => `${prefix}${a}`;
|
||||
const {
|
||||
load,
|
||||
loadJquery,
|
||||
} = DOM;
|
||||
|
||||
const funcBefore = (callback) => {
|
||||
const srcs = [
|
||||
CloudCmd.DIRCLIENT_MODULES + 'polyfill.js',
|
||||
'/modules/domtokenlist-shim/dist/domtokenlist.min.js',
|
||||
].map(addPrefix);
|
||||
|
||||
DOM.loadJquery(() => {
|
||||
DOM.load.parallel(srcs, callback);
|
||||
});
|
||||
const src = prefix + CloudCmd.DIRCLIENT_MODULES + 'polyfill.js';
|
||||
loadJquery(wraptile(load.js, src, callback));
|
||||
};
|
||||
|
||||
CloudCmd.PREFIX = prefix;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
/* global DOM */
|
||||
|
||||
require('domtokenlist-shim');
|
||||
|
||||
const scrollIntoViewIfNeeded = require('scroll-into-view-if-needed').default;
|
||||
DOM.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue