Eel: How to check current window size?

Created on 23 Nov 2020  路  1Comment  路  Source: ChrisKnott/Eel

As we know user can change the window size, so what I want is, whenever user changes the window size, I can check whether it is not too small or big according to my UI, and after certain point, the window does not change (became smaller)

Desktop (please complete the following information):

  • OS: [Windows]
  • Browser [Chrome]
help wanted

Most helpful comment

Hey @sohelshekhIn,
As far as I can understand from your issue It can be easily solved by introducing JavaScript snippet in your UI part of the code.

`

window.onresize = function (){

if (window.outerWidth < 1200 || window.outerHeight < 800){

    window.resizeTo(1200, 800);
}

}
`
In the above case I avoided the size of screen to be less than 1200 X 800.
Hope it helps. Happy coding

>All comments

Hey @sohelshekhIn,
As far as I can understand from your issue It can be easily solved by introducing JavaScript snippet in your UI part of the code.

`

window.onresize = function (){

if (window.outerWidth < 1200 || window.outerHeight < 800){

    window.resizeTo(1200, 800);
}

}
`
In the above case I avoided the size of screen to be less than 1200 X 800.
Hope it helps. Happy coding

Was this page helpful?
0 / 5 - 0 ratings

Related issues

axl3blaz3 picture axl3blaz3  路  4Comments

TheBdouilleur picture TheBdouilleur  路  5Comments

ClayMDMI picture ClayMDMI  路  4Comments

mattiaornaghi picture mattiaornaghi  路  5Comments

sameera-madushan picture sameera-madushan  路  3Comments