onPrintDialogClose - cancel or print button clicked?
- Dominant language
- JavaScript
- Stars
- 4.5k
- Forks
- 688
- PR merge metrics
- No merged PRs in 30d
Description
The onPrintDialogClose event works well, but I could not find a way to determine if the user clicked the "Print" or "Cancel" button. Can you please add the actual button clicked as parameter in the callback function?
Example:
printJS({
printable: data.report,
type: 'pdf',
base64: true,
onPrintDialogClose: function (e) {
if (e === true) {
alert('Printing done - Print clicked');
} else {
alert('Cancel button clicked');
}
}
});
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.