Use forEach instead of flush

The README says domready supports IE9+
and conveniently, forEach was introduced in IE9.