W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] Re: media types

From: Jonny Axelsson <jax@opera.com>
Date: Mon, 26 Jul 2004 15:08:18 +0200
Message-ID: <opsbqxf4ncoh2a7v@pc057.qadoc.oslo.opera.com>
On Mon, 26 Jul 2004 12:43:08 +0100, Malcolm Rowe  
<malcolm-what at farside.org.uk> wrote:

> Mark Schenk writes:
>> Therefor I would like to suggest a read-only "window.medium" set to a
>> media type ("screen" | "print" | "projection" | "tv" | "handheld" |
>> "speech" etc).
>
> Not a bad idea, I suppose, but I'd like to understand more about the use  
> case for this kind of functionality. What *behaviour* (not presentation,  
> since that would be CSS) do you expect you'd change based on the active  
> media type?

The most immediate use cases would be to have presentation-type behaviours  
for projection, or less behaviours for handheld.


> [Hmm, you could probably emulate this now: by using CSS's @media blocks,  
> and then detecting what style rules were active from script.]

Yes you can, but that must be considered a rather ugly hack.


> Secondly, is 'the current media type' only ever a single value, or can  
> more than one media type be active at one time (e.g., 'projection'  
> + 'screen'?).

No, a given canvas can only have one media type. Projection and screen  
(and print and ...) are mutually exclusive. But you can have different  
media type for each window.


> Finally, 'window.medium' is a really bad choice for the name. I know  
> that 'medium' is the right word (if only one can be active), but  
> no-one's going to associate 'medium' with 'active media type'.  
> 'mediaType' would be better.

This would be more confusing. Whether or not this is a good habit, many  
window and document properties have been aliased, and document.mediaType  
would be more likely to be assumed to be the MIME content type (e.g.  
text/html).


-- 
Jonny Axelsson,
Web standards,
Opera Software ASA
Received on Monday, 26 July 2004 06:08:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:35 UTC