doc preview: eliminated need to wait for DOM paint completion