Skip to content

Build your personal knowledge base with Trilium Notes

JSDoc improvements

zadam450b52f6da8c
diff --git a/src/services/backend_script_api.js b/src/services/backend_script_api.js
index 08b9fed796..5abf704edc 100644
--- a/src/services/backend_script_api.js
+++ b/src/services/backend_script_api.js
@@ -43,12 +43,16 @@ const optionsService = require('./options.js');
*/
function BackendScriptApi(currentNote, apiParams) {
/**
- * Note where the script started executing
+ * Note where the script started executing (entrypoint).
+ * As an analogy, in C this would be the file which contains the main() function of the current process.
* @type {BNote}
*/
this.startNote = apiParams.startNote;
/**
- * Note where the script is currently executing. Don't mix this up with the concept of active note
+ * Note where the script is currently executing. This comes into play when your script is spread in multiple code
+ * notes, the script starts in "startNote", but then through function calls may jump into another note (currentNote).
+ * A similar concept in C would be __FILE__
+ * Don't mix this up with the concept of active note.
* @type {BNote}
*/
this.currentNote = currentNote;