This Window resize would be very hard to be done.
You cannot resize window if its not a window opened by your application...(just one opend by a opener one can be re-sized, you cannot resize a tab)
Why do you need the resize? If its just to force a redraw, relayout because you added something in the DOM and this is not sized correct then you can
try setting a style.display on the "MainFrame" you have by setting it to once to style.display.None and then back again to style.display.block...
This also dosent mean that the relayout will work, maybe the css its just not correct for what you want to do...
Note: Window class inside has a check if the new size is diff then the previous one, just in this case fires the handler...
Blaze