Remove the find bar's dependency on the find controller
Pull request #10100 removed the last usage of the find controller from the find bar, so we can drop the dependency now.
This commit is contained in:
parent
ba172c7d03
commit
7aca53b1a4
@ -369,7 +369,6 @@ let PDFViewerApplication = {
|
|||||||
|
|
||||||
// TODO: improve `PDFFindBar` constructor parameter passing
|
// TODO: improve `PDFFindBar` constructor parameter passing
|
||||||
let findBarConfig = Object.create(appConfig.findBar);
|
let findBarConfig = Object.create(appConfig.findBar);
|
||||||
findBarConfig.findController = this.findController;
|
|
||||||
findBarConfig.eventBus = eventBus;
|
findBarConfig.eventBus = eventBus;
|
||||||
this.findBar = new PDFFindBar(findBarConfig, this.l10n);
|
this.findBar = new PDFFindBar(findBarConfig, this.l10n);
|
||||||
|
|
||||||
|
@ -38,15 +38,9 @@ class PDFFindBar {
|
|||||||
this.findResultsCount = options.findResultsCount || null;
|
this.findResultsCount = options.findResultsCount || null;
|
||||||
this.findPreviousButton = options.findPreviousButton || null;
|
this.findPreviousButton = options.findPreviousButton || null;
|
||||||
this.findNextButton = options.findNextButton || null;
|
this.findNextButton = options.findNextButton || null;
|
||||||
this.findController = options.findController || null;
|
|
||||||
this.eventBus = options.eventBus;
|
this.eventBus = options.eventBus;
|
||||||
this.l10n = l10n;
|
this.l10n = l10n;
|
||||||
|
|
||||||
if (this.findController === null) {
|
|
||||||
throw new Error('PDFFindBar cannot be used without a ' +
|
|
||||||
'PDFFindController instance.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add event listeners to the DOM elements.
|
// Add event listeners to the DOM elements.
|
||||||
this.toggleButton.addEventListener('click', () => {
|
this.toggleButton.addEventListener('click', () => {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user