Window: print() method
Baseline 2023Newly available
Since June 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
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
js
print()
Parameters
None.
Return value
None (undefined
).
Specifications
Specification |
---|
HTML # printing |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
print |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- Printing
beforeprint
eventafterprint
event