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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes1 ? Yes ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes ? Yes ? ? ?

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

See also