puter.exit()
GUIWill terminate the running application and close its window.
puter.exit()
puter.exit()
does not accept any parameters.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<button id="exit-button">Exit App</button>
<script>
const exit_button = document.getElementById('exit-button');
exit_button.addEventListener('click', () => {
puter.exit();
});
</script>
</body>
</html>