diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-11 14:23:49 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-18 21:32:35 -0400 |
commit | ac603d54a3a53bec2881199756f3dd6a1aa44057 (patch) | |
tree | de4560a6e468162ccfc01bc76c787f4218283f73 /ext/mixed/js/display.js | |
parent | fd6ea0e404da2657f110599061af4034a524283a (diff) |
Add support for displaying images
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r-- | ext/mixed/js/display.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index c2284ffe..9587ec3b 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -20,6 +20,7 @@ * DOM * DisplayContext * DisplayGenerator + * MediaLoader * WindowScroll * apiAudioGetUri * apiBroadcastTab @@ -62,7 +63,8 @@ class Display { this.clickScanPrevent = false; this.setContentToken = null; - this.displayGenerator = new DisplayGenerator(); + this.mediaLoader = new MediaLoader(); + this.displayGenerator = new DisplayGenerator({mediaLoader: this.mediaLoader}); this.windowScroll = new WindowScroll(); this._onKeyDownHandlers = new Map([ @@ -479,6 +481,8 @@ class Display { const token = {}; // Unique identifier token this.setContentToken = token; try { + this.mediaLoader.unloadAll(); + switch (type) { case 'terms': await this.setContentTerms(details.definitions, details.context, token); |