fix preview frame error
This commit is contained in:
parent
565e3a8c6a
commit
275f455e73
@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class Frontend extends TextScanner {
|
class Frontend extends TextScanner {
|
||||||
constructor(popup, initEventDispatcher) {
|
constructor(popup, initEventDispatcher=null) {
|
||||||
super(
|
super(
|
||||||
window,
|
window,
|
||||||
() => this.popup.isProxy() ? [] : [this.popup.getContainer()],
|
() => this.popup.isProxy() ? [] : [this.popup.getContainer()],
|
||||||
@ -77,8 +77,10 @@ class Frontend extends TextScanner {
|
|||||||
window.visualViewport.addEventListener('resize', this.onVisualViewportResize.bind(this));
|
window.visualViewport.addEventListener('resize', this.onVisualViewportResize.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.initEventDispatcher !== null) {
|
||||||
this.initEventDispatcher.on('setDisabledOverride', this.onSetDisabledOverride.bind(this));
|
this.initEventDispatcher.on('setDisabledOverride', this.onSetDisabledOverride.bind(this));
|
||||||
this.initEventDispatcher.on('popupChange', this.onPopupChange.bind(this));
|
this.initEventDispatcher.on('popupChange', this.onPopupChange.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
yomichan.on('orphaned', this.onOrphaned.bind(this));
|
yomichan.on('orphaned', this.onOrphaned.bind(this));
|
||||||
yomichan.on('optionsUpdated', this.updateOptions.bind(this));
|
yomichan.on('optionsUpdated', this.updateOptions.bind(this));
|
||||||
|
Loading…
Reference in New Issue
Block a user