Summary

Opens the Print Dialog to print the current document.

Syntax

window.print() 

Notes

Starting with Chrome 46.0 this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.

Specification

Specification Status Comment
HTML Living Standard
The definition of 'print()' in that specification.
Living Standard  

Browser Compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support Yes
Notes
Full support Yes
Notes
Notes Starting with Chrome 46.0 this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.
Edge ? Firefox Full support YesIE ? Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also