import {basename} from './functions'; import each from './form-elements-each'; import Doc from './doc'; // Just kill form submission Doc.getByTag('form')[0].onsubmit = function (e) { e.preventDefault(); e.stopPropagation(); console.log(`Form 'submit' event fired.`); return false; }; // What polyfills did we have to load? const $polyfillPattern = /\/polyfills\//; const scriptList = Doc.scripts().filter(file => { return $polyfillPattern.test(file.getAttribute('src')) }); if (scriptList.length > 0) { const polyfillList = []; scriptList.forEach(file => { const src = file.getAttribute('src'); const name = basename(src).replace('.js', '') .replace('.min', ''); const el = `