Does the offsetHeight of the element have a side effect?
In the code for breaking Bootstrap in the method, hide()
I see the following line:
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
I don't understand what the point .offsetHeight
at the end is unless it has a side effect because it is not assigned with anything. Does it have a side effect?
source to share
In some older browsers, such as older versions of IE, sometimes there was a problem of not replanning (re-rendering the presentation) after doing some action.
An investigative request for some properties, such as offsetHeight
causes the DOM to recalculate and redraw objects on the screen.
Thus, the side effect causes the screen to be rescheduled (redrawn). Quirky but old trick for older browsers.
Here is a question where this is suggested as a solution for an old version of Google Chrome where it doesn't work as expected without it.
source to share