Some of the common actions to be run on the client should run as soon as possible after the basic body element in the DOM is ready to avoid flash of content:
Right when the DOM is ready some of the things are done that are complementing server side transformations and are independent of client side settings:
- Hook up events for lazy loading of images
- Hook up events for collapsing of tables
The app client is going to call a JS function to set/run:
- Classify Platform
- Theme selection (to avoid a flash of white background)
- Dimming of images
- body margins/padding
- Text size adjustment