cuando ejecuto esto solo me muestra el cargador y no me sale la ip. hice una modificación diferente pero nada parece funcionar... y también soy muy nuevo en javascript.
const getIp = document.getElementById('ipTrigger'); getIp.addEventListener('click', function(){ swal.fire({ title: 'Your public IP', confirmButtonText: 'Show my public IP', showCloseButton: true, text: 'Your public IP will be received ' + 'via AJAX request', showLoaderOnConfirm: true, preConfirm: function () { return new Promise(function (resolve) { $.get('https://api.ipify.org?format=json') .done(function (data) { swal.insertQueueStep(data.ip) resolve() }) }) } }); });