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

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

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Tue, 29 Dec 2009 17:44:44 +0200
Message-ID: <4B3A23EC.8080509@helsinki.fi>
On 12/29/09 12:01 AM, Jonas Sicking wrote:
> On Mon, Dec 28, 2009 at 6:12 PM, Olli Pettay<Olli.Pettay at helsinki.fi>  wrote:
>> On 12/28/09 6:44 PM, Jo?o Eiras wrote:
>>>>
>>>> Throwing an error does not seem very compatible either.
>>>>
>>>
>>> Returning a boolean from print() would not be problematic.
>>>
>>> Note that desktop UAs support printing most of the time, while handheld
>>> or tv ones don't.
>>
>> Returning a boolean sounds good to me.
>
> Only issue is that pages might want to be able to detect if printing
> is available without actually trying to print. I.e. in order to not
> display a print button in kiosk browsers.



Yeah, navigator.isPrintingEnabled or some such could be also useful.

(eventually might be useful to expose UA capabilities in some generic 
way, and also some way accessible from CSS media queries.)


-Olli


>
> / Jonas
>
Received on Tuesday, 29 December 2009 07:44:44 UTC

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