diff options
Diffstat (limited to 'ext/mixed/js/template-handler.js')
-rw-r--r-- | ext/mixed/js/template-handler.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/mixed/js/template-handler.js b/ext/mixed/js/template-handler.js index 86e2414f..a5a62937 100644 --- a/ext/mixed/js/template-handler.js +++ b/ext/mixed/js/template-handler.js @@ -20,15 +20,9 @@ class TemplateHandler { constructor(html) { this._templates = new Map(); - this._html = html; - this._doc = null; - this._initialize(); - } - - _initialize() { - this._doc = new DOMParser().parseFromString(this._html, 'text/html'); - for (const template of this._doc.querySelectorAll('template')) { + const doc = new DOMParser().parseFromString(html, 'text/html'); + for (const template of doc.querySelectorAll('template')) { this._setTemplate(template); } } |