diff --git a/src/assets/js/main.js b/src/assets/js/main.js index 5e38841..ca2a3db 100644 --- a/src/assets/js/main.js +++ b/src/assets/js/main.js @@ -36,4 +36,11 @@ async function readResponse(response) { } catch (error) { outputArea.innerHTML = `Error: ${error.message}`; } -} \ No newline at end of file +} + +// Event listeners +sendButton.addEventListener('click', async () => { + outputArea.innerHTML = ''; + const response = await sendGen(); + readResponse(response); +}); \ No newline at end of file