Files
remark42/web/app/common/polyfills.js
T
Alexandr KandAleksei Gurianov 419d2ae75e Add focus-visible polyfill, issue #187 (#193)
* add focus-visible polyfill
* remove unnecessary outline: none from styles
* make buttons Pin, Block, Delete visible when focused
* fix outline of user details close button
* close user info by ESC
* user info: don't focus the close button
2018-08-23 20:46:16 +04:00

20 lines
443 B
JavaScript

import 'core-js/es7/promise';
import 'focus-visible';
export default function loadPolyfills() {
const fillCoreJs = () => {
if (
'startsWith' in String.prototype &&
'endsWith' in String.prototype &&
'includes' in Array.prototype &&
'assign' in Object &&
'keys' in Object
)
return Promise.resolve();
return import(/* webpackChunkName: "polyfills" */ 'core-js');
};
return fillCoreJs();
}