kiwix-js
kiwix-js copied to clipboard
Use global `appState` object to track article and asset loading, and provide spinner messaging accordingly
Following on from #1123, a "universal" messaging solution could be provided without altering the DOM in the messaging channel by leveraging the global appState object. At various points in the back end, this object can be updated to show the loading state. If using libzim (#870), then the state would be updated in the interface between app.js and the libzim worker, but messaging would be more limited as we don't have an API to report on the internal libzim decoding state.