mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Include additional data when fetching browser preferences in the PDF Viewer (bug 1908401)
To avoid having to request and await various browser data early during the PDF Viewer initialization, we can include that data in the existing preference fetching instead. With other planned changes to the PDF Viewer, the current situation would only become worse over time. *Note:* Technically this data aren't preference-values, however we're already including other non-prefs in this list (e.g. `isInAutomation`) and doing it this way simplifies the overall implementation.
This commit is contained in:
parent
15b71b82ed
commit
99f34f4c2e
4 changed files with 23 additions and 56 deletions
|
@ -56,6 +56,11 @@ const OptionKind = {
|
|||
* primitive types and cannot rely on any imported types.
|
||||
*/
|
||||
const defaultOptions = {
|
||||
allowedGlobalEvents: {
|
||||
/** @type {Object} */
|
||||
value: null,
|
||||
kind: OptionKind.BROWSER,
|
||||
},
|
||||
canvasMaxAreaInBytes: {
|
||||
/** @type {number} */
|
||||
value: -1,
|
||||
|
@ -66,6 +71,16 @@ const defaultOptions = {
|
|||
value: false,
|
||||
kind: OptionKind.BROWSER,
|
||||
},
|
||||
localeProperties: {
|
||||
/** @type {Object} */
|
||||
value: null,
|
||||
kind: OptionKind.BROWSER,
|
||||
},
|
||||
nimbusDataStr: {
|
||||
/** @type {string} */
|
||||
value: "",
|
||||
kind: OptionKind.BROWSER,
|
||||
},
|
||||
supportsCaretBrowsingMode: {
|
||||
/** @type {boolean} */
|
||||
value: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue