diff options
| author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-19 11:36:05 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-19 11:36:05 -0400 | 
| commit | a6344f635de2464465317b2ceeb6e19aef056848 (patch) | |
| tree | 3c101c3dbf38dfb26bfb74bb0a38daedc8166811 /ext/mixed/js/display.js | |
| parent | 3b2663ba0957c65be959ba18dc80e13625e28f02 (diff) | |
| parent | 99c1a6a6bc0ce55eb2f20703a7f7f69c4bcefd9d (diff) | |
Merge pull request #446 from toasted-nutbread/dictionary-images
Dictionary 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); |