pastebin

Paste Search Dynamic
Recent pastes
browserSupportsAllFeatures
  1.   function browserSupportsAllFeatures() {
  2.         return window.Promise
  3.             && window.fetch
  4.             && window.URL
  5.             && window.URLSearchParams
  6.             && window.WeakMap
  7.             // object-fit support
  8.             && ('objectFit' in document.documentElement.style);
  9.     }
  10.  
  11.     function loadScript(src) {
  12.         var js = document.createElement('script');
  13.         js.src = src;
  14.         js.onerror = function () {
  15.             console.error('Failed to load polyfill script ' + src);
  16.         };
  17.         document.head.appendChild(js);
  18.     }
  19.  
  20.     if (!browserSupportsAllFeatures()) {
  21.         loadScript('/dist/theme-bundle.polyfills.js');
  22.     }
Parsed in 0.015 seconds