Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import loadScripts from '../utils/loadScripts';
  2. import IndexController from './IndexController';
  3.  
  4. const polyfillsNeeded = [];
  5.  
  6. if (!('Promise' in self)) polyfillsNeeded.push('/js/polyfills/promise.js');
  7.  
  8. try {
  9.   new URL('b', 'http://a');
  10. }
  11. catch (e) {
  12.   polyfillsNeeded.push('/js/polyfills/url.js');
  13. }
  14.  
  15. loadScripts(polyfillsNeeded, function() {
  16.   new IndexController(document.querySelector('.main'));
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement