I'm currently making an app in Electron. What i would like to do is decrease the width of the browser window so it has a nice smooth animation when closing it down.
From what I've seen online people say to use the setSize method which I've done, however i need to slow this down a bit. Is there a way to reference the window in CSS/give the window an Id so i can set up some keyframes? (im still learning CSS and Javascript)
Javascript Code:
function closeWindow()
{
const sidebar = remote.BrowserWindow.getFocusedWindow();
sidebar.setSize(0,80, true);
sidebar.setPosition(0, -700, true)
}
Thankyou