change DOMContentLoaded by load window event