From a9fcc0cde6a09872e038e4aa4600d5cd80a71374 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 27 Mar 2016 20:00:41 -0700 Subject: Switch to handlebars for templating --- ext/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/client.js') diff --git a/ext/client.js b/ext/client.js index 85a4ba64..6055dc26 100644 --- a/ext/client.js +++ b/ext/client.js @@ -53,8 +53,10 @@ class Client { this.hidePopup(); } else { range.setEnd(range.endContainer, range.startOffset + length); - this.popup.html(renderDefs(results.slice(0, 5))); - this.showPopup(range); + renderTemplate({defs: results.slice(0, 5)}, 'defs.html', (html) => { + this.popup.html(html); + this.showPopup(range); + }); } }); } -- cgit v1.2.3