Reputation: 745
I have a hidden form element, and it has an input tag with an attribute of 'value'.
Will reading the value of 'value' (using getElementById) cause a reflow? Will changing the value of 'value' (using getElementById & setAttribute) while the element is hidden cause a reflow?
I know different browsers behave differently but was just looking for some input on this subject. I have also set 'display' to 'none' - will this effect the behaviour of the questions above?
Thanks in advance for any help!
Upvotes: 1
Views: 818
Reputation: 3669
No, reading or writing the value attribute will not cause reflow. See this question and its accepted answer: When does reflow happen in a DOM environment? for more details.
Upvotes: 1