Technically, the instance of a data-bound widget is created first. As soon as the instance is available, then the widget is accessible by scripting and pending for rendering.
If, and when, a data-bound widget is rendered depends on the story's Loading Optimization Setting:
- Viewport Loading
- Background Loading
- None

Viewport Loading
For Viewport Loading, the rendering phase is split up into three different sub-phases:
- Initial rendering phase
- Background rendering phase
- Viewport rendering phase
Background Loading
For Background Loading, the rendering phase is split up into two different sub-phases:
- Initial rendering phase
- One or two background rendering phases (depending on scripts processing)
None
For None, there is only an initial rendering phase.
Introducing the Data Loading Story
In this lesson, the same story is used in all scenarios to demonstrate the different Loading Optimization Settings available to you. Let's take a closer look at the story, as it's important to know how the story is built, in order to understand the data loading flow as we explore the data loading scenarios.
Summary
In general, the following statements are true:
- All content in the visible area of the story is fully rendered as soon as the initial rendering phase is complete.
- The user can start to interact with the story to trigger scripting (for example, press a button that runs a script) as soon as the initial rendering AND the script execution of the page.onInitialization and page.onActive event scripts are processed.
- Any widget that is referenced in a script is rendered, regardless of if it is part of the visible area or not.