Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .html() method, it throws: Could not load dompurify #2914

Closed
ShunCai opened this issue Sep 14, 2020 · 2 comments
Closed

Use .html() method, it throws: Could not load dompurify #2914

ShunCai opened this issue Sep 14, 2020 · 2 comments

Comments

@ShunCai
Copy link

ShunCai commented Sep 14, 2020

Hello,Use jspdf.umd.js@2.1.1 in chrome browser,it throws the following error:Could not load dompurify

The Script:

window.jsPDF = window.jspdf.jsPDF;
var doc = new jsPDF();
doc.html(document.body, {
   callback: function (doc) {
     debugger;
   }
});

The HTML:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>jsPDF bug</title>
    <script src="jspdf.umd.js"></script>
</head>

<body>
    <p>Test Could not load dompurify</p>
</body>
</html>

The Error:
image
image

@ShunCai ShunCai changed the title Could not load dompurify Use .html() method, it throws: Could not load dompurify Sep 14, 2020
@ShunCai
Copy link
Author

ShunCai commented Sep 14, 2020

Thanks,After adding html2canvas(1.0.0-rc.7), the problem is solved.

@ShunCai ShunCai closed this as completed Sep 14, 2020
@HackbrettXXX
Copy link
Collaborator

Yes, the error message was wrong (fixed in #2906).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants