How can I trigger an event when the window is resized?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I wanted to implement something like this

window.addEventListener('resize', this.windowResize());

but I was unable to get it to work. Any ideas?

@Juliv Fewguson​ Every form has a onResize event. Documentation can be found here.

I have the onresize set, but how do I set skins for different states dynamically (normal, focus, hover, etc)

Please ignore comment, I thought this was a different question I had asked. Thank you for your help