add onload event to config