exitFullScreen
Category: Application Control
Namespace: web.app.exitFullScreen
Description
Exit fullscreen mode and restore the normal window with title bar, borders, and taskbar visible. Returns the application to its previous window state.
Syntax
await web.app.exitFullScreen();
Parameters
None
Returns
Promise<boolean> - Returns true when fullscreen mode is exited
Example
Simple example
await web.app.exitFullScreen();
Practical example
document.getElementById('exit-fullscreen-btn').addEventListener('click', async () => {
await web.app.exitFullScreen();
});
Advanced example
document.addEventListener('keydown', async (event) => {
if (event.key === 'Escape') {
const isFullscreen = await web.app.isFullScreen();
if (isFullscreen) {
await web.app.exitFullScreen();
console.log('Exited fullscreen mode');
}
}
});
Use Cases
- Exit presentation mode
- Return from video fullscreen
- ESC key handler for fullscreen exit
- Exit button in fullscreen UI
- Automatic exit after presentation ends
- Exit fullscreen on user interaction
- Return to normal mode after media playback
- Exit kiosk mode
Error Handling
This method does not throw errors. If not in fullscreen, calling this method has no effect.
Performance Tips
- Check fullscreen status before exiting
- Restore previous window state after exit
- Provide multiple exit methods (ESC, button, double-click)
- Consider showing exit instructions in fullscreen
Related Methods
web.app.enterFullScreen()- Enter fullscreen modeweb.app.isFullScreen()- Check if in fullscreenweb.app.windowRestore()- Restore normal windowweb.app.windowMaximize()- Maximize window
Notes
- Restores window to state before fullscreen
- ESC key typically exits fullscreen automatically
- Window borders and title bar become visible
- Taskbar reappears after exiting