Issue with getBoundingRect( )

Hi All,

haveing problems with the getBoundingRect( ) function. Are there any known issues? Or am I just doing some mess?

import wixWindow from 'wix-window';
let windowHeight = 0;

wixWindow.getBoundingRect()
  .then( (windowSizeInfo) => {
  	windowHeight = windowSizeInfo.window.height;
        } )
  .catch( (err) => {
  	console.log(err);
  	} );


Any help much appreciated.

Thanks!
Thomas

I believe it works if you do the “getBoundingRect()” call inside a “$w.onReady” handler

Hi Ofer, that’s it. Thanks for your help!