exit()GUI


Will terminate the running application and close its window.

Syntax

puter.ui.exit()

Parameters

puter.ui.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>