sync the html_run which uses setTimeout to wait for dom execution