summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index f3aead44..b9daa9a0 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -34,9 +34,10 @@
*/
class Display extends EventDispatcher {
- constructor(pageType) {
+ constructor(pageType, japaneseUtil) {
super();
this._pageType = pageType;
+ this._japaneseUtil = japaneseUtil;
this._container = document.querySelector('#definitions');
this._definitions = [];
this._optionsContext = {depth: 0, url: window.location.href};
@@ -53,7 +54,10 @@ class Display extends EventDispatcher {
this._autoPlayAudioTimer = null;
this._autoPlayAudioDelay = 400;
this._mediaLoader = new MediaLoader();
- this._displayGenerator = new DisplayGenerator({mediaLoader: this._mediaLoader});
+ this._displayGenerator = new DisplayGenerator({
+ japaneseUtil,
+ mediaLoader: this._mediaLoader
+ });
this._hotkeys = new Map();
this._actions = new Map();
this._messageHandlers = new Map();
@@ -177,6 +181,10 @@ class Display extends EventDispatcher {
return this._mode;
}
+ get japaneseUtil() {
+ return this._japaneseUtil;
+ }
+
async prepare() {
// State setup
const {documentElement} = document;