From 15f59c41f7f18a133485bfaa46af82dc6565bba0 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Tue, 7 Mar 2023 22:00:33 +0100
Subject: [PATCH] feat: template mapping

---
 application/source/dom/customelement.mjs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/application/source/dom/customelement.mjs b/application/source/dom/customelement.mjs
index 2a3e69817..8e284f4c6 100644
--- a/application/source/dom/customelement.mjs
+++ b/application/source/dom/customelement.mjs
@@ -946,6 +946,11 @@ function initShadowRoot() {
         return this;
     }
 
+    const mapping = this.getOption("templateMapping", {});
+    if (isObject(mapping)) {
+        html = new Formatter(mapping).format(html);
+    }
+
     this.shadowRoot.innerHTML = html;
     return this;
 }
-- 
GitLab