Loop UI Handlers
Specify Loop actions based on the end user interactions with UI elements
The loopOpenHandler is a method that works in conjunction with the My Loops page and with the search dropdown menu. It will get called when the end user clicks on a Loop in one of those areas. It will also get called when a user installs, restarts, or unpauses your Loop. The purpose of this handler is to allow the end user to easily get back to the starting point of a Loop, by allowing Loop Authors to programmatically trigger their Loop’s Start Whisper. You can do this by wrapping your Start Whisper code within the
ui.loopOpenHandler
method.Here is an example of how to use the loopOpenHandler to trigger a Start Whisper:
Important: Utilizing the loopOpenHandler function is included in our Product Requirements. Without this function, your Loop will not provide the ideal user experience and will not meet the criteria stated in our Loop Approval Checklist.
(async () => {
ui.listenSearchbar(doSomethingWithSearchText);
ui.listenGlobalSearch(doSomethingWithSearchText);