[whatwg] [html5] window.print() undefined

Dean Edwards dean at edwards.name
Mon Jul 18 14:40:54 PDT 2005


Olav Junker Kjær wrote:
> Dean Edwards wrote:
> 
>> That's not really the point. It could be any style setting that is 
>> assigned using script.
> 
> 
> The real problem is that styles assigned directly using 
> element.style.something (or using the style html attribute) cannot be 
> different for different medias. Print-events are not really a solution 
> for this problem, since you might also want the dynamic styles to be 
> different for e.g. handhelds vs. desktop browsers.
> 
> I think that dynamically assigning/removing classes rather than styles 
> is a cleaner separation between style and logic, which is just as 
> desirable for script code as it is for HTML.
> 

OK. Forget CSS for a moment (although this is still a consideration for 
me). What if I want to suspend a timer while the page is being printed?

-dean




More information about the whatwg mailing list