We then create a function to handle all the processing that will follow. This is particularly useful to monitor the parsing and loading process of documents. The following readystates are available to developers.

0

uninitialized

Object is not initialized with data.

1

loading

Object is loading its data.

2

loaded

Object has finished loading its data.