Safer call to render callback

Since render didn't have parameters before, it's sometimes passed as an event handler "as is". When that's the case, render() receive the event arguments.