small refactorings

This commit is contained in:
zadam
2023-06-29 22:10:13 +02:00
parent f4ec4e58c7
commit 48029cea7c
37 changed files with 95 additions and 155 deletions

View File

@@ -94,6 +94,9 @@ function getParams(params) {
}).join(",");
}
/**
* @param {BNote} note
*/
function getScriptBundleForFrontend(note) {
const bundle = getScriptBundle(note);
@@ -111,6 +114,13 @@ function getScriptBundleForFrontend(note) {
return bundle;
}
/**
* @param {BNote} note
* @param {boolean} [root=true]
* @param {string|null} [scriptEnv]
* @param {string[]} [includedNoteIds]
* @param {string|null} [backendOverrideContent]
*/
function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds = [], backendOverrideContent = null) {
if (!note.isContentAvailable()) {
return;