could be shortened to (also the following lines)

`c.onresize = c.onresize || true`;