CondoWebAppCloseApplication

This method allows you to close the miniapp programmatically — for example, after completing a scenario or when the user clicks a "Done" button.

Working with child windows

Platforms

B2B WebB2C WebB2C Cordova

Parameters

This method takes no parameters.

Return value

If successful, the method returns a JSON object with a single success field:
json
{ "success": true }

Usage example

typescript
// pages/index.tsx import React, { useCallback } from 'react' import bridge from '@open-condo/bridge' import { Button } from '@open-condo/ui' export default function MiniappPage (): React.ReactNode { const handleClose = useCallback(() => { bridge.send('CondoWebAppCloseApplication').then(() => { // Miniapp closed }).catch((error) => { console.error(error) }) }, []) return ( <Button type='primary' onClick={handleClose}>Close application</Button> ) }