I have a page that has a fairly complicated layout. When the page is initially opened there\'s a problem with the aligment of some of the elements. However, this problem can be
Can also be done with CustomEvent:
var ev = new CustomEvent('resize'); //instantiate the resize event ev.initEvent('resize'); window.dispatchEvent(ev); // fire 'resize' event!