Update code comment example to include onResize option