Add files
This commit is contained in:
commit
bb80829159
18195 changed files with 2122994 additions and 0 deletions
9
509bba0_unpacked_with_node_modules/~/dom-helpers/util/inDOM.js
generated
Executable file
9
509bba0_unpacked_with_node_modules/~/dom-helpers/util/inDOM.js
generated
Executable file
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/dom-helpers/util/inDOM.js
|
||||
// module id = 594
|
||||
// module chunks = 4
|
53
509bba0_unpacked_with_node_modules/~/dom-helpers/util/requestAnimationFrame.js
generated
Executable file
53
509bba0_unpacked_with_node_modules/~/dom-helpers/util/requestAnimationFrame.js
generated
Executable file
|
@ -0,0 +1,53 @@
|
|||
'use strict';
|
||||
|
||||
var canUseDOM = require('./inDOM');
|
||||
|
||||
var vendors = ['', 'webkit', 'moz', 'o', 'ms'],
|
||||
cancel = 'clearTimeout',
|
||||
raf = fallback,
|
||||
compatRaf;
|
||||
|
||||
var getKey = function getKey(vendor, k) {
|
||||
return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + 'AnimationFrame';
|
||||
};
|
||||
|
||||
if (canUseDOM) {
|
||||
vendors.some(function (vendor) {
|
||||
var rafKey = getKey(vendor, 'request');
|
||||
|
||||
if (rafKey in window) {
|
||||
cancel = getKey(vendor, 'cancel');
|
||||
return raf = function (cb) {
|
||||
return window[rafKey](cb);
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* https://github.com/component/raf */
|
||||
var prev = new Date().getTime();
|
||||
|
||||
function fallback(fn) {
|
||||
var curr = new Date().getTime(),
|
||||
ms = Math.max(0, 16 - (curr - prev)),
|
||||
req = setTimeout(fn, ms);
|
||||
|
||||
prev = curr;
|
||||
return req;
|
||||
}
|
||||
|
||||
compatRaf = function (cb) {
|
||||
return raf(cb);
|
||||
};
|
||||
compatRaf.cancel = function (id) {
|
||||
return window[cancel](id);
|
||||
};
|
||||
|
||||
module.exports = compatRaf;
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/dom-helpers/util/requestAnimationFrame.js
|
||||
// module id = 2015
|
||||
// module chunks = 4
|
Loading…
Add table
Add a link
Reference in a new issue