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

Dead/obsolete code with "HTMLOptions" interface? #2886

Closed
HanXHX opened this issue Aug 28, 2020 · 1 comment
Closed

Dead/obsolete code with "HTMLOptions" interface? #2886

HanXHX opened this issue Aug 28, 2020 · 1 comment

Comments

@HanXHX
Copy link

HanXHX commented Aug 28, 2020

Hi,

I'm working with your lib (2.1.1).

I simply load the module. When I want to use the "html" method, i see an "HTMLOptions" interface:

https://github.com/MrRio/jsPDF/blob/ff854e79ae70169572fa3fbf5937b92f80a38ffc/src/modules/html.js#L964-L982

However in the module, it's a simple "Collection of settings":

https://github.com/MrRio/jsPDF/blob/ff854e79ae70169572fa3fbf5937b92f80a38ffc/src/modules/html.js#L970

What is the right param of html method? Simple object, with some allowed keys (callback, html2canvas, jsPdf) or- "HTMLOptions" ?

The doc only says "Collection of settings" with only "callback" property (http://raw.githack.com/MrRio/jsPDF/master/docs/module-html.html#~html).

Kind regards,

EM

@HackbrettXXX
Copy link
Collaborator

Thanks for the report. The jsdoc comment is outdated. The typings file is closer to the truth, although I'm not sure which of the options are actually respected. E.g. enableLinks does not seem to be used in the code. Could you maybe prepare a pull request that fixes both the jsdoc comment and only lists the correct options in the typings file?

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

No branches or pull requests

2 participants