waitForDOM function to wait until e.g. IronRouter is done rendering