ready(function(){ var log = dom.get('#log'), form = dom.get('form.hidden'), running = false; form.on('submit',function(e){ if(!running){ running = true; log.drop('*') .append( dom.create('li') .append('Running...') ) .css({ display: 'block' });; form.children .attr({ disabled: 'disabled' }); fetch('.',{ method: 'post', body: new FormData(this), mode: 'cors', credentials: 'include' }) .then(function(res){ return res.json(); }) .then(function(data){ if(data){ for(var i in data){ var ul = dom.create('ul'), step = dom.create('li').append('Step: '+i).append(ul); for(var ii in data[i]){ var d = data[i][ii]; ul.append( dom.create('li') .append( ii+': '+(d[0]?'PASS':'FAIL - '+d[1]) ) ); } log.append(step); } log.append("