home
Category: Browser Control
Namespace: web.browser.home
Description
Navigate to the home page. The home page URL is configured in the application settings.
Syntax
await web.browser.home();
Parameters
None
Returns
Promise<boolean> - Returns true when operation completes
Example
Simple example
await web.browser.home();
Practical example
document.getElementById('home-btn').addEventListener('click', async () => {
await web.browser.home();
});
Advanced example
async function goHome() {
const currentUrl = await web.browser.getCurrentUrl();
await web.browser.home();
const homeUrl = await web.browser.getCurrentUrl();
if (currentUrl !== homeUrl) {
console.log('Navigated from', currentUrl, 'to home:', homeUrl);
}
}
Use Cases
- Return to application home page
- Reset navigation to start
- Implement home button
- Navigate to default page
- Return to main screen
- Reset application state
- Implement keyboard shortcuts
- Quick navigation to start
Related Methods
web.browser.navigate()web.browser.getCurrentUrl()
Notes
- Part of browser control functionality
- Asynchronous operation
- Returns promise