[whatwg] Re: media types
malcolm-what at farside.org.uk
Mon Jul 26 04:43:08 PDT 2004
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
[Hmm, you could probably emulate this now: by using CSS's @media blocks, and
then detecting what style rules were active from script.]
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'?).
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.
More information about the whatwg