[whatwg] Re: media types

Malcolm Rowe malcolm-what at farside.org.uk
Mon Jul 26 06:45:21 PDT 2004


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

Ok. Something like 'if media=projection, bind arrow keys to move to 
next/previous section'? That sounds fair enough. I'm a firm believer in the 
'one document to rule them all' device-independence idea, but there's no 
reason to prevent authors from customising for specific devices, I guess. 

Should the UA fire an event when changing the media type? (Opera's 
full-screen mode, for example). 

Hmm. Would this make it easy for authors to prevent pages from being 
printed? I wouldn't want that. 

>> [dirty hack]
> Yes you can, but that must be considered a rather ugly hack.

I know. I never suggested it was a good idea, but I'm rather pleased with 
the 'eurgh' response it seems to have elicited from everyone. :-) 

> 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.

Ok - and on a 'multi-modal' browser, you effectively have more than one 
'window'? (though only one 'current position', the same in each window, I 
guess). 

>> 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).

You said above that each window can have a different media type, so it 
doesn't make sense to talk about the 'media type' of a document - it's 
purely a presentational thing. In principle, I wouldn't strenuously object 
to reflecting a window property into the document property, though I don't 
know which one you'd choose in a multi-modal UA (then again, I assume that 
multi-modal UAs still only make one of those windows available in the 
'window' property, so I guess it'd be that one). 

No, the thing that I was objecting to more was that the noun 'medium', 
without any context, is far from obvious as a description. I'm not sure that 
'mediaType' is that likely to be confused with Content-Type, but if it is, 
use something else. I just think that someone reading 'window.medium' is 
likely to think: "what about window.small or window.large?". I know I would. 

Regards,
Malcolm 





More information about the whatwg mailing list