Re: Web-mobile : having a @media on script ?

On Mon, Oct 13, 2008 at 7:43 AM, Olivier GENDRIN
<olivier.gendrin@gmail.com> wrote:
> And the issues is not only about mobile device (the presentation was),
> but more about display media (as you told, i would be happy to be able
> to play with the accelerometers of a cell through javascript, but not
> for @media=screen, or print).

wow... availability of an accelerometer surely can't be determined
simply by media type, but it would be useful to have hooks letting you
know it is available and make use of it ...

That aside, I think @media for script could be good. When omitted (all
currently deployed content? the valid stuff at least) the script would
apply in any media, as stylesheets are handled.  It is always handy,
when authoring, to have these options available for use.

window.media sounds interesting too.

This seems pretty straightforward where the media type is stable. I'm
getting tangled trying to imagine how it would work if a user switches
the media mode... for example, toggling between the OperaShow
(presentation media) mode in Opera.

With stylesheets this is trivial (I'm sure the implementation is
complex) ... the styles that match the current media type are applied.
Styles for other media types are not applied.

Scripts don't work that way ... they don't sit there ready to be
applied based on the current context... and when applied they may
manipulate all kinds of things.

I wonder... is this truly about the relationship between scripts and
media type, or is it about UI events and media type? Perhaps I missed
some key context from the presentation. (Unfortunately I can't read
french).

Intriguing ideas though... would love to understand how it would work better.

cheers
Ben

Received on Monday, 13 October 2008 01:01:12 UTC