Break import cycles, in the viewer, for PDFViewerApplication

Currently the `web/app.js` file pulls in various build-specific dependencies, via the use of import maps, and those files in turn import from `web/app.js` thus creating undesirable import cycles.
To avoid this we instead pass in a `PDFViewerApplication`-reference, immediately after it's been created, to the relevant code.

Note that we use an ESLint plugin rule, see `import/no-cycle`, that is normally able to catch import cycles. However, in this case import maps are involved which is why this wasn't caught.
This commit is contained in:
Jonas Jenwald 2024-02-09 12:01:59 +01:00
parent 6da9448f6c
commit e98b9b019a
6 changed files with 49 additions and 34 deletions

View file

@ -221,6 +221,8 @@ class IL10n {
* @interface
*/
class IPDFPrintServiceFactory {
static initGlobals() {}
static get supportsPrinting() {
return false;
}