mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Re-use the isValidExplicitDest
helper function in the worker/viewer
Currently we re-implement the same helper function twice, which in hindsight seems like the wrong decision since that way it's quite easy for the implementations to accidentally diverge. The reason for doing it this way was because the code in the worker-thread is able to check for `Ref`- and `Name`-instances directly, which obviously isn't possible in the viewer but can be solved by passing validation-functions to the helper.
This commit is contained in:
parent
5f4d923618
commit
165d90fe26
7 changed files with 90 additions and 119 deletions
|
@ -36,6 +36,7 @@ import {
|
|||
import {
|
||||
build,
|
||||
getDocument,
|
||||
isValidExplicitDest,
|
||||
PDFDataRangeTransport,
|
||||
PDFWorker,
|
||||
version,
|
||||
|
@ -94,6 +95,7 @@ const expectedAPI = Object.freeze({
|
|||
InvalidPDFException,
|
||||
isDataScheme,
|
||||
isPdfFile,
|
||||
isValidExplicitDest,
|
||||
noContextMenu,
|
||||
normalizeUnicode,
|
||||
OPS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue