Redirect to home after window.print

I’m using Vue 3 but it’s not a Vue issue. I have an app when the user creates a ticket, the print dialog box appears and the user prints the ticket. This is on a kiosk btw, so there will be no selecting of a printer or anything.

Once the ticket is printed, the ticket screen should automatically take you to the home screen. What i’m doing right now is this:

  setTimeout(() => {
    window.location.href = "/";
  }, 6500);

I have it in my function right after the dialog appears. Of course, If the user is slow to click print, the page redirects regardless.

Is there a way to print without a dialog (auto print) or capture the event when the print button is clicked? Option 2 I believe doesn’t exist, but you never know. Thanks