support for execution of async functions + integration with backend through server.exec()

This commit is contained in:
azivner
2018-01-23 21:59:30 -05:00
parent 27cb6b1c4d
commit f439969962
4 changed files with 32 additions and 3 deletions

View File

@@ -196,11 +196,11 @@ const noteEditor = (function() {
return currentNote ? currentNote.detail.type : null;
}
function executeScript() {
async function executeScript() {
if (getCurrentNoteType() === 'code') {
const script = codeEditor.getValue();
eval(script);
eval("(async function() {" + script + "})()");
}
}