puter.exit()GUI


Will terminate the running application and close its window.

Syntax

puter.exit()

Parameters

puter.exit() does not accept any parameters.

Examples

<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>