You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
751 B

testing();
function testing() {
let promised = fetch(api_url + 'getnodes').
then(resp => resp.json()).
then(obj => {
document.getElementById('json').innerText = JSON.stringify(obj.api);
if (typeof(obj.api) != 'undefined') {
let list = '<ol>';
for (let item of obj.api) {
console.log('test.item:',item);
let url = api_url + `getcas?addr=${item}`;
list += `<li><a href="${url}">${item}</a></li>\n`
}
list += '</ol>';
document.getElementById('list').innerHTML = list;
}
return obj;
}).
catch(console.error);
promised.then(obj => { console.log('obj:',obj); return obj; });
}
// ----------------------------------------------------
console.log('txpool.js loaded');