decoupled protected session holder from presentation stuff and similar things

This commit is contained in:
azivner
2018-03-25 21:16:57 -04:00
parent 47eb1e3e02
commit ac1b06967f
12 changed files with 130 additions and 99 deletions

View File

@@ -1,5 +1,4 @@
//import messagingService from './messaging.js';
//import ScriptContext from './script_context.js';
import messagingService from './messaging.js';
function reloadApp() {
window.location.reload(true);
@@ -116,14 +115,6 @@ async function stopWatch(what, func) {
return ret;
}
async function executeBundle(bundle) {
const apiContext = ScriptContext(bundle.note, bundle.allNotes);
return await (function () {
return eval(`const apiContext = this; (async function() { ${bundle.script}\r\n})()`);
}.call(apiContext));
}
function formatValueWithWhitespace(val) {
return /[^\w_-]/.test(val) ? '"' + val + '"' : val;
}
@@ -263,7 +254,6 @@ export default {
isRootNode,
escapeHtml,
stopWatch,
executeBundle,
formatValueWithWhitespace,
formatLabel,
requireLibrary,