Regarding @bobsilverberg's comment, I would stick with the JavaScript wait as it's clean and lower latency.