Deprecation warning using minified version jspdf
See original GitHub issueRunning an export causes a warning about eventual deprecation, is this known or maybe already fixed?
jspdf.es.min.js?8baf:197 [Deprecation] Synchronous
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Deprecation warning using minified version jspdf · Issue #2994
I assume the warning comes when loading images from a URL? The thing is, that the API of addImage is synchronous for historic...
Read more >How to properly use jsPDF library - javascript - Stack Overflow
Using the debug version of jspdf worked, where the other versions in any configuration did not. Maybe minification is breaking it somehow? or...
Read more >jsPDF: Client-side JavaScript PDF Generation for Everyone
A library to generate PDFs in JavaScript. ... In "compat" API mode, jsPDF has the same API as MrRio's original version, which means...
Read more >jspdf - npm
PDF Document creation from JavaScript. Latest version: 2.5.1, last published: a year ago. Start using jspdf in your project by running `npm ...
Read more >jsPDF table example - Unsaved project - Plunker
See mrrio.github.io/jsPDF/doc/symbols/PubSub.html * Backward compatible ... and ')' with pdf-safe versions * * Doing to8bitStream does NOT make this PDF ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I assume the warning comes when loading images from a URL? The thing is, that the API of
addImage
is synchronous for historic reasons and we therefore need to make synchronous requests. There is an easy workaround, though, by preloading the image and passing it e.g. as data url to theaddImage
method. We might consider makingaddImage
optionally async.I lost track of this issue, I’m so sorry. @Steflie comment made a ping so I found it again.
I solved it by doing like so: