How Hard Can It Be: Use JavaScript to Close Web Browser Window After Print

from blog Blog on hjr265.me, | ↗ original
So here is a simple JavaScript task I had to tackle for Toph: When a user clicks the Print button, open a new tab/window and activate the print dialog. Close the window when the user confirms the print or cancels the dialog. Attempt 1: Call window.close() Immediately After window.print() I used the onclick attribute on the Print button to open...