Tutorial: View.hide

View.hide

Hides the View on a window.

Example

let view;
async function createView() {
    const me = await fin.Window.getCurrent();
    return fin.View.create({ 
        name: 'viewNameHide', 
        target: me.identity, 
        bounds: {top: 10, left: 10, width: 200, height: 200} 
    });
}

async function hideView() {
    view = await createView();
    console.log('View created.');

    await view.navigate('https://google.com');
    console.log('View navigated to given url.');

    await view.hide();
}

hideView()
    .then(() => console.log('View hidden.'))
    .catch(err => console.log(err));