I'm having an issue with centering some images that are loaded to an absolute position (previously set by customer team).
I've traced the problem to getting an elements height.
An image is appended and if I try to get its height immediately after, it's returns 0. I did some testing with setTimeout and narrowed it down to a 17 ms (on my system) delay for the height to return correctly.
How can I work around this without using the setTimeout function, each computer the webapp is run on will have a different delay time?