When enabled, supported Questions and Features will only render at runtime if they are actually going to be visible.
If they happen to be in a container that is not yet visible:
- By default, they will postpone rendering until they are visible in the DOM (i.e. the parent container has become visible); and,
- If the
defer_render.staggeroption is also configured, they will render in the background over time so that they will likely all be pre-rendered by the time a user makes them visible.
By spreading out the rendering over time, deferred rendering is most useful for assessments with a large number of Questions and/or Features – especially those with lots of heavy content such as math; i.e. those that require a lot of DOM elements to be rendered. If rendering is not deferred in such cases, it can be a significant strain on the browser when rendering them all at once initially.
defer_render.stagger option is enabled, the regular deferred rendering behaviour will still continue at the same time, i.e. Questions and Features will render as soon as they become visible even if staggered rendering hasn't gotten to them first.
- Chemistry Essay V2
- Choice Matrix
- Cloze Association
- Cloze Dropdown
- Cloze Text
- Formula Essay V2
- Image Cloze
- Image Cloze Association V2
- Long Text V2
- Multiple Choice Question
- Order List
- Short Text
- Token Highlight
- Image Tool
- Line Reader
- Scrollable Passage
- Video Player
Note Unsupported Questions and Features will always render as normal at runtime, regardless of whether their container is visible or not.
Request object key
This option can be initialized as one of the following types: boolean object.
Type boolean Determines whether to enable deferred rendering of Questions and Features.
Type object Additional options for configuring deferred rendering.
stagger booleanEnables staggered rendering, whereby hidden Questions and Features are rendered in the background at a configurable interval until completion.
stagger_interval numberThe interval in milliseconds between each Question and Feature background render.
Version added: v2023.2.LTS