
Print event detection
Hi,
I'm working on a Firefox extension where I need to detect print event. I've tried the following approaches:
- beforeprint – Fires immediately when the print dialog opens (works correctly in Chrome).
- afterprint – Fires immediately when the dialog closes (works correctly in Chrome).
- window.focus and visibilitychange – Work inconsistently with noticeable delay, depending on how Firefox handles focus/visibility updates after closing the dialog.
Questions: 1. Is there a reliable way in Firefox to detect print event? 2. Are there any known workarounds or events that could be used for this purpose?
Thanks.
Hi,
I'm working on a Firefox extension where I need to detect print event. I've tried the following approaches:
* beforeprint – Fires immediately when the print dialog opens (works correctly in Chrome).
* afterprint – Fires immediately when the dialog closes (works correctly in Chrome).
* window.focus and visibilitychange – Work inconsistently with noticeable delay, depending on how Firefox handles focus/visibility updates after closing the dialog.
Questions:
1. Is there a reliable way in Firefox to detect print event?
2. Are there any known workarounds or events that could be used for this purpose?
Thanks.
Modified