I think this is supposed to read `bar.offsetHeight`.