Implement onResize, an event which fires on widget size change