ionicons.js 1012 B

1234567891011121314151617181920212223242526272829
  1. (function(doc){
  2. var scriptElm = doc.scripts[doc.scripts.length - 1];
  3. var warn = ['[ionicons] Deprecated script, please remove: ' + scriptElm.outerHTML];
  4. warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:')
  5. var parts = scriptElm.src.split('/');
  6. parts.pop();
  7. parts.push('ionicons');
  8. var url = parts.join('/');
  9. var scriptElm = doc.createElement('script');
  10. scriptElm.setAttribute('type', 'module');
  11. scriptElm.src = url + '/ionicons.esm.js';
  12. warn.push(scriptElm.outerHTML);
  13. scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
  14. doc.head.appendChild(scriptElm);
  15. scriptElm = doc.createElement('script');
  16. scriptElm.setAttribute('nomodule', '');
  17. scriptElm.src = url + '/ionicons.js';
  18. warn.push(scriptElm.outerHTML);
  19. scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
  20. doc.head.appendChild(scriptElm);
  21. console.warn(warn.join('\n'));
  22. })(document);