Remove polyfills
Browse files- src/common/polyfill.js +0 -29
- src/index.js +0 -1
src/common/polyfill.js
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
// Source: https://gist.github.com/paulirish/1579671
|
2 |
-
(function () {
|
3 |
-
let lastTime = 0;
|
4 |
-
const vendors = ['ms', 'moz', 'webkit', 'o'];
|
5 |
-
|
6 |
-
for (let x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
7 |
-
window.requestAnimationFrame = window[`${vendors[x]}RequestAnimationFrame`];
|
8 |
-
window.cancelAnimationFrame = window[`${vendors[x]}CancelAnimationFrame`] || window[`${vendors[x]}CancelRequestAnimationFrame`];
|
9 |
-
}
|
10 |
-
|
11 |
-
if (!window.requestAnimationFrame) {
|
12 |
-
window.requestAnimationFrame = function (callback) {
|
13 |
-
const currTime = new Date().getTime();
|
14 |
-
const timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
15 |
-
const id = window.setTimeout(
|
16 |
-
() => { callback(currTime + timeToCall); },
|
17 |
-
timeToCall,
|
18 |
-
);
|
19 |
-
lastTime = currTime + timeToCall;
|
20 |
-
return id;
|
21 |
-
};
|
22 |
-
}
|
23 |
-
|
24 |
-
if (!window.cancelAnimationFrame) {
|
25 |
-
window.cancelAnimationFrame = function (id) {
|
26 |
-
clearTimeout(id);
|
27 |
-
};
|
28 |
-
}
|
29 |
-
}());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/index.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import Overlay from './core/overlay';
|
2 |
import Element from './core/element';
|
3 |
import Popover from './core/popover';
|
4 |
-
import './common/polyfill';
|
5 |
import {
|
6 |
CLASS_CLOSE_BTN,
|
7 |
CLASS_NEXT_STEP_BTN,
|
|
|
1 |
import Overlay from './core/overlay';
|
2 |
import Element from './core/element';
|
3 |
import Popover from './core/popover';
|
|
|
4 |
import {
|
5 |
CLASS_CLOSE_BTN,
|
6 |
CLASS_NEXT_STEP_BTN,
|