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

Add new method onBeforeGetContent #160

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Conversation

MatthewHerbst
Copy link
Owner

This method allows the user to change the contents of the page before it is retrieved for printing. This occurs before the existing onBeforePrint which is called after the page content has been retrieved and right before the print window is opened.

Long term, it likely makes sense to change onBeforePrint to have this functionality, and then remove this function, since there is little use for it with this function existing.

This method allows the user to change the contents of the page
before it is retrieved for printing. This occurs before the
existing `onBeforePrint` which is called after the page content has
been retrieved and right before the print window is opened.

Long term, it likely makes sense to change `onBeforePrint` to have
this functionality, and then remove this function, since there is
little use for it with this function existing.
Copy link
Owner Author

@MatthewHerbst MatthewHerbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see this in action @andfs

@MatthewHerbst MatthewHerbst merged commit 7e6f854 into master Aug 20, 2019
@MatthewHerbst MatthewHerbst deleted the onBeforeGetContent branch August 20, 2019 20:00
@andfs
Copy link
Contributor

andfs commented Aug 20, 2019

Excited to see this in action @andfs

Thanks, man \o/

@mckelveygreg
Copy link

Thank you all for you work :) I've bee watching this for the last week 🚀

@MatthewHerbst
Copy link
Owner Author

Will get this released once I get #161 merged since right now a Promise rejection could result in the library still printing depending on if the user handled the error or not.

@MatthewHerbst
Copy link
Owner Author

Published as v2.4.0!

@andfs
Copy link
Contributor

andfs commented Aug 27, 2019

Published as v2.4.0!

Great news \o/
Thanks :)

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

Successfully merging this pull request may close these issues.

3 participants