Due to the async nature, the program flow is pretty confusing, so I am trying to briefly document it, otherwise each time I get lost trying to figure out which part of the code I need to modify. For example, if I need to modify some values after the data is loaded from a Web API, but before it is put into the table, I need to figure out where the data load happens and where the HTML rendering happens.
Here is the way I am doing it:
/** * @fileOverview Custom code for the Candidates List page. * Program flow on page load: * - customSearchInit() * - initSearchPage() * - populateDropdownFields() * - LoadAdditionalListDataAndContinue() * - loadListData() * - generateHtmlTable() * - finishAsync() * - completePageLoad() */
Is there a recommended / popular syntax for documenting the program flow? Is this a common practice to do it?