SHOW:
|
|
- or go back to the newest paste.
| 1 | var webComponentsSupported = ('registerElement' in document
| |
| 2 | && 'import' in document.createElement('link')
| |
| 3 | - | && 'content' in document.createElement('template')); |
| 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 |