crodgers

more polyfill

Jan 26th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var webComponentsSupported = ('registerElement' in document
  2.     && 'import' in document.createElement('link')
  3.     && 'content' in document.createElement('template'));
  4.  
  5. //lazy load the polyfills if needed
  6. if (!webComponentsSupported) {
  7.     var script = document.createElement('script');
  8.     script.async = true;
  9.     srcipt.src = 'webcomponents-lite.min.js';
  10.     script.onload = finishLazyLoading;
  11.     document.head.appendChild(script);
  12. } else {
  13.     finishLazyLoading();
  14. }
  15.  
  16. see https://github.com/PolymerLabs/zuperkulblog-progressive/blob/master/app/static/scripts/app.js
Advertisement
Add Comment
Please, Sign In to add comment