MDN self-hosted library · e01.org

Window: print() method

HTML DOM

no runnable cells web-api-instance-method upstream source

HTML DOM

Opens the print dialog to print the current document.

If the document is still loading when this function is called, then the document will finish loading before opening the print dialog.

This method will block while the print dialog is open.

Syntax

print()

Parameters

None.

Return value

None (undefined).

Specifications

Browser compatibility

See also

  • Printing
  • beforeprint event
  • afterprint event