Open mdahardy opened 3 months ago
This could also be used for adding custom logic, e.g. adding an event listener to submit the page on "Enter".
Note: We recently wanted to prevent pasting into open-end questions. This was quite difficult to do with the current implementation, but would be easy if we had a beforeLoad handler. Bumping this up in priority.
We removed callbacks from the survey logic as most logic can just be handled in the async function itself. However, a callback that calls after the document body has loaded, but before it displays, could be useful for e.g. animating the display of the page which is difficult to do now. Because all logic that happens before the document body has loaded can be handled in the async function, the scope of these listeners can be relatively constrained to handle the logic between load/display and submit/remove display.