accounts-frontend/packages/app/polyfills.ts

19 lines
638 B
TypeScript
Raw Normal View History

2019-06-30 20:49:28 +05:30
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'url-search-params-polyfill';
2017-04-13 00:04:12 +05:30
import 'whatwg-fetch';
import { shim as shimPromiseFinally } from 'promise.prototype.finally';
import { polyfill as rafPolyfill } from 'raf';
rafPolyfill();
shimPromiseFinally();
2016-07-30 00:59:27 +05:30
// allow :active styles in mobile Safary
document.addEventListener('touchstart', () => {}, true);
// disable mobile safary back-forward cache
// http://stackoverflow.com/questions/8788802/prevent-safari-loading-from-cache-when-back-button-is-clicked
window.onpageshow = (event: PageTransitionEvent) => {
2020-05-24 04:38:24 +05:30
event.persisted && window.location.reload();
};