|
|
const tecnologiasPreferidasList = `HTML5
|
|
CSS3
|
|
LESS
|
|
JavaScript
|
|
ReactJS
|
|
Netuno
|
|
PostgreSQL
|
|
Linux
|
|
GIT`.split('\n');
|
|
|
|
console.info('Minhas tecnologias preferidas:', tecnologiasPreferidasList);
|
|
|
|
if (document.getElementById('tecnologiasPreferidas')) {
|
|
document.getElementById('tecnologiasPreferidas').innerHTML = '<li>'+ tecnologiasPreferidasList.join('</li><li>') + '</li>';
|
|
}
|
|
|
|
function processaBackend(url, callback) {
|
|
const http = new XMLHttpRequest();
|
|
http.onreadystatechange = function() {
|
|
if (this.readyState == 4) {
|
|
console.log('Foi no BACKEND e VOLTOU!');
|
|
console.warn('Resposta do BACKEND em STRING: ', this.responseText);
|
|
const dados = JSON.parse(this.responseText);
|
|
if (callback) {
|
|
callback(dados);
|
|
}
|
|
}
|
|
};
|
|
console.log('CHAMA O BACKEND!!!!');
|
|
http.open("GET", url, true);
|
|
http.send();
|
|
console.log('ENVIOU!!!!')
|
|
return 'JSON..'
|
|
}
|
|
|
|
|
|
function criarProduto() {
|
|
alert('Vai Criar o Produto...');
|
|
}
|
|
|