Nit: should use `window.setTimeout`