Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use
document.title
as a fallback for title in PDFs
If a PDF has no embedded title, don't use `document.title` as a fallback. In top-level frames PDF.js sets the title to the filename in the URL, so this worked out OK. When PDF.js was embedded in an iframe however it did not modify `document.title` and it would typically be set to a generic default such as "PDF.js viewer" (the default title of the PDF.js viewer application). The one case where we might actually want to use `document.title` is in a custom viewer where the publisher has taken care to set it appropriately based on some other source. This is a tiny minority of usage currently. Fixes #3372
- Loading branch information