How does one even get the print dialog ? The following code just opens a window without the print dialog

var docprint = window.open("about:blank", "_blank");
docprint.document.open(); ...