title: How to catch window.print() function call?
body: <p>There's a way to check if somebody's printing the page at the moment by listening to 'print' changes:</p>
  
  <pre><code>const mql = window.matchMedia('print');
  mql.addEventListener('change', e =&gt; {
    if (e.matches) console.log('Printing');
  });
  </code></pre>
  
  <p>But this doesn't work if Print was called manually by window.print() function. Is there still a way to catch it?</p>