I need to know if the user has click the print or cancel button but onafterprint event fires if either was clicked, why ??
window.onafterprint = () => {
// event should fire only if print button is clicked
}
Enter this page and do the Ctrl + p try to cancel or print or save the document and watch the alert
can anyone please explain ?