[removed] and [removed] get fired at the same time

前端 未结 3 1701
挽巷
挽巷 2021-01-05 09:51

I have defined onbeforeprint and I modify my html code and now once I finish printing that is on select of print button I want the onafterprint to

3条回答
  •  臣服心动
    2021-01-05 10:17

    onbeforeprint fired before dialog appears and allows one to change html and so on.

    onafterprint is fired just before dialog appears. It is not even possible to know, whether document was actually printed or user canceled it. Needless to say about when printing finished (if started at all).

    Again: no event is available to track anything happened in print dialog, i.e. answer to your question is no.

    Moreover, I hope what your need will never be implemented, cause this allows to frustrate user. He/she asks to print one document, but got something different.

提交回复
热议问题