diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-03-27 20:00:41 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-03-27 20:00:41 -0700 |
commit | a9fcc0cde6a09872e038e4aa4600d5cd80a71374 (patch) | |
tree | 3bd6e00e2c8eec94218636f554db2f2663141569 /ext/client.js | |
parent | 2bdb5763780e68889b355200a60844da83d3ede7 (diff) |
Switch to handlebars for templating
Diffstat (limited to 'ext/client.js')
-rw-r--r-- | ext/client.js | 6 |
1 files changed, 4 insertions, 2 deletions
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); + }); } }); } |