execute an onload handler, if it exists