partial support for calling onload once the DOM is ready