Enabling Viewport Loading for Your Custom Widget
You can enable viewport loading for your custom widget so that it's loaded only when being in the visible area of the screen.
Context
When viewport loading is selected as the loading optimization setting for the story, only contents in the visible area of the screen are loaded in view time.
Viewport loading is supported for custom widgets. However, as a custom widget developer, you need to enable viewport loading for your custom widget.
Procedure
Results
-
Load resource file of custom widget <widget name>: The process involves downloading the custom widget's resource file. It appears in the loading sequence, whether the custom widget supports viewport loading or not.
-
Render custom widget <widget name>: The displayed loading time includes the time required by the custom widget framework to initialize the custom widget and retrieve data for it. However, it doesn’t include the time taken by the widget to render itself with the data as it can be hard to measure, particularly if animations are involved during rendering.