I am curious about whether DOM node attributes are synchronous when it comes to styling information. The article I was reading mentioned that scripts requesting style information like "offsetHeight" can trigger incremental layout synchronously.
The article suggested that there is a mechanism called the "dirty node" system that will pause script execution until the document has been fully laid out. So, if a dirty node n is modified and n.offsetHeight is called from JavaScript, it will wait until the offset height has been fully reified. Is my understanding of this correct? Can I always expect the browser to provide me with the most up-to-date version of any attached DOM element?
In other words, if I make changes to a node's styling and then retrieve a property that is affected by this styling, can I be certain that the value I receive will reflect the node with the updated styling? If not, how can I determine when my styling changes have taken effect?