---
title: Window.print()
slug: Web/API/Window/print
tags:
  - API
  - HTML DOM
  - Method
  - Reference
  - Window
browser-compat: api.Window.print
---
{{ ApiRef() }}

Opens the Print Dialog to print the current document.

In most browsers, this method will block while the print dialog is open. However in more recent versions of Safari, it may return immediately.

## Syntax

    window.print()

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [Printing](/en-US/docs/Web/Guide/Printing)
- {{ domxref("window.onbeforeprint") }}
- {{ domxref("window.onafterprint") }}
