[Firefox] Fetch browser preferences/options together with the viewer preferences (bug 1862192)

Currently we *synchronously* fetch a number of browser preferences/options, from the platform code, during the viewer respectively PDF document initialization paths.
This seems unnecessary, and we can re-factor the code to instead include the relevant data when fetching the regular viewer preferences.
This commit is contained in:
Jonas Jenwald 2023-10-31 11:39:04 +01:00
parent 50c0fccda6
commit eebc230cf1
7 changed files with 109 additions and 81 deletions

View file

@ -34,7 +34,7 @@ class GenericPreferences extends BasePreferences {
}
async _readFromStorage(prefObj) {
return JSON.parse(localStorage.getItem("pdfjs.preferences"));
return { prefs: JSON.parse(localStorage.getItem("pdfjs.preferences")) };
}
}