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
If the miniapp window was opened via the
CondoWebAppShowModalWindow method, calling CondoWebAppCloseApplication will close that modal window and emit the corresponding event — just as if CondoWebAppCloseModalWindow had been called.Platforms
| B2B Web | B2C Web | B2C 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> ) }