Tutorial: View.getBounds

View.getBounds

Gets the position and size of a View within a window. View position is relative to the bounds of the window. ({top: 0, left: 0} represents the top left corner of the window)

Example

const view = await fin.View.create({
    name: 'viewNameSetBounds',
    target: fin.me.identity,
    bounds: {top: 10, left: 10, width: 200, height: 200}
});

await view.navigate('https://google.com');

await view.setBounds({
    top: 100,
    left: 100,
    width: 300,
    height: 300
});

console.log(await view.getBounds());