Skip to content

Notes for Development

Yusuf edited this page May 20, 2020 · 4 revisions
  1. Inside a JavaScript module, the imports are fetched with CORS. Thus, if an external script is imported, it should support CORS. If not, the script can be downloaded and added as part of the repo to load locally, and thus, avoiding CORS issues.

  1. When importing external libraries with callbacks (like google charts), make sure to use a promise to assure it has been loaded before its usage. Otherwise, we'd have a race condition and errors. To set an example, refer to functions "ensureGoogleChartsIsSet" and "chart" in visualize.js.

  1. For +3rd level chaining, Classes are used with static functions.

Clone this wiki locally