W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] window.print() when printing is not supported

From: Kornel Lesinski <kornel@geekhood.net>
Date: Mon, 28 Dec 2009 18:43:49 -0000
Message-ID: <op.u5nvnbkqptj49s@aimac.local>
On Mon, 28 Dec 2009 11:54:00 -0000, Olli Pettay <Olli.Pettay at helsinki.fi>  
wrote:

> So I think it *might* make sense to throw some error if printing isn't  
> supported. Or should browsers which don't support window.print() just
> not have print() method in the window object? (problem is that I'd guess  
> everyone just expects .print() to be there)


Why would page need to know if printing works? What (useful) thing could  
it do if it detects failed print?

If all you want is to display error when printing fails, that's a UA  
issue. Why burden all sites with handling of error they can't fix? UA can  
signal the error, and can do it better, e.g. offer option to configure a  
printer.


I'm afraid that even letting pages know whether printing is available  
might have negative consequences.

I can't print anything from computer I'm using at the moment, BUT if I  
need to print something, I can save page/document and print it from  
another computer. If pages could detect that my computer can't print, they  
could wrongly assume I can't print anything at all, and hide print-related  
options from me. I'd hate if ticket sites automatically decided to  
snail-mail me tickets without offering option to print them myself.

-- 
regards, Kornel Lesinski
Received on Monday, 28 December 2009 10:43:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:54 UTC