Add the onresize callback support