Window.onafterprint

  • Revision slug: DOM/window.onafterprint
  • Revision title: window.onafterprint
  • Revision id: 31326
  • Created:
  • Creator: fusionchess
  • Is current revision? No
  • Comment 2 words added, 3 words removed

Revision Content

{{ DomRef() }}

Summary

The onafterprint property sets and returns the onafterprint event handler code for the current window.

Syntax

window.onafterprint = event handling code

Notes

Some browsers (including Firefox 6 and later and Internet Explorer) send beforeprint and afterprint events to let content determine when printing may have occurred. You can use this to adjust the user interface presented during printing (such as by displaying or hiding user interface elements during the print process).

The beforeprint event is raised after the user prints or aborts a Print Dialog.

Specification

Not part of specification.

Browser compatibility

{{ CompatibilityTable() }}

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support {{ 6.0 }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Feature Firefox Mobile (Gecko) Android IE Mobile Opera Mobile Safari Mobile
{{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

Revision Source

<p>{{ DomRef() }}</p>
<h3>Summary</h3>
<p>The <strong>onafterprint</strong> property sets and returns the onafterprint event handler code for the current window.</p>
<h3>Syntax</h3>
<pre class="eval">window.onafterprint = <em>event handling code</em>
</pre>
<h3>Notes</h3>
<p>Some browsers (including Firefox 6 and later and Internet Explorer) send <code>beforeprint</code> and <code>afterprint</code> events to let content determine when printing may have occurred. You can use this to adjust the user interface presented during printing (such as by displaying or hiding user interface elements during the print process).</p>
<p>The beforeprint event is raised after the user prints or aborts a Print Dialog.</p>
<h3>Specification</h3>
<p>Not part of specification.</p>
<h2>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Firefox (Gecko)</th> <th>Chrome</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{ 6.0 }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Firefox Mobile (Gecko)</th> <th>Android</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h2>See also</h2>
<ul> <li><a class="internal" href="/en/DOM/window.print" title="en/DOM/window.print"><code>window.print</code></a></li> <li><a class="internal" href="/en/DOM/window.onbeforeprint" title="en/DOM/window.onbeforeprint"><code>window.onbeforeprint</code></a></li> <li><a class="internal" href="/en/Printing" title="en/Printing">Printing</a></li>
</ul>
Revert to this revision