Consider passing the necessary parameters as arguments when you call `initialize`. See for example how `PDFFindBar` is initialized: https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L496.