Product: PDFTron WebViewer
Product Version: 7.3.3
Please give a brief summary of your issue:
I get an error message “Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions” when I run my app with viewer.
Please describe your issue and provide steps to reproduce it:
I get an error message “Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions” when I run my app with viewer.
I don’t know why this happens, because i’m using electron offline app, and initial document and viewer files are in the same project/folder.
I attach screenshots of Network page from dev tools, with info about my Home file and webviewer.js file so you can check and help me to slove this problem.
I also assume, that this problem cause another problem. I can’u use any of API functions (for example setTheme/disableElements) in my viewer.
If I tried to disable elements in WebViewer “part of code” (before .then), some buttons from header toolset are acctualy disabled. but when I call this method later, it doesn’t work. I think that this is because of the “cross domain” error.
Please provide a link to a minimal sample where the issue is reproducible: