summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 0c7a0301..93ba620f 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -27,10 +27,10 @@
* JsonSchema
* Mecab
* ObjectPropertyAccessor
+ * TemplateRenderer
* Translator
* conditionsTestValue
* dictTermsSort
- * handlebarsRenderDynamic
* jp
* optionsLoad
* optionsSave
@@ -63,6 +63,7 @@ class Backend {
audioSystem: this.audioSystem,
renderTemplate: this._renderTemplate.bind(this)
});
+ this._templateRenderer = new TemplateRenderer();
const url = (typeof window === 'object' && window !== null ? window.location.href : '');
this.optionsContext = {depth: 0, url};
@@ -1230,7 +1231,7 @@ class Backend {
}
async _renderTemplate(template, data) {
- return handlebarsRenderDynamic(template, data);
+ return await this._templateRenderer.render(template, data);
}
_getTemplates(options) {