Waiting for a stable state in HTML5 specs

There is a concept of waiting for a stable state in the HTML5 specs ( http://www.w3.org/TR/html5/single-page.html#await-a-stable-state ) Can anyone explain this with an example what is this does means?

+3


source to share


2 answers


An example of this is the asynchronous XMLHttpRequest . You can make a request like this:

var myRequest = new XMLHttpRequest();
...

      



At the time of the query, you can see the state myRequest

- in particular myRequest.readyState

. Until the request completes, the request is not in a stable state.

+3


source


Basically, this is an internal thing to explain how some algorithms work. Some parts of these algorithms run synchronously, while others wait for a stable state before starting.

When the user agent enforces a stable state , if there are asynchronously executing algorithms waiting for a stable state , then the user agent should start the synchronous section and then resume the asynchronous algorithm execution (if necessary).



For example, images are waiting for a stable state:

When the user agent updates the img

element image data , it should follow these steps:

+1


source







All Articles