Question for confirmation : are DOM changes applied immediately ?
I've got a weird case of adding an HTML fragment from an Ajax call does not seem to have happened immediately. In the done() callback the fragment is appended into an element and some subsequent code is executed. The code fails because it doesn't seem to find the added markup. And indeed, when pausing the execution, the markup is not present yet.
However, everything works when the code is scheduled in a timeout of zero ms. Maybe some kind of precedence in the rendering process of the page. I'm pretty new to this kind of issues really.
Hence my question : Are changes to the DOM, and all their visual consequences, applied immediately ? Or is this to be considered an asynchronous process ?
Thanks ! :-)