Re: HTML Extensibility Through Script

Hi, Andrew-

This seems to have drifted off-topic rather quickly... To refocus, I 
wasn't asking for a way to sniff browser strings, which is a brittle way 
to determine the featureset of the UA.  I intended this thread to 
discuss the possibility of conditional operators, either through a 
script API or (preferably) via a declarative markup or featurestring.

SMIL has the <switch> element, which is used in SVG to good effect. 
Maybe something akin to that would be useful in HTML.  It's a lot more 
powerful than a simple fallback mechanism, and not much more complex. 
If that isn't backwards-compatible enough, some simpler variation on it 
might be.

Andrew Fedoniouk wrote:
> 
> ----- Original Message ----- From: "Maciej Stachowiak" <mjs@apple.com>
>> Scripts can already get this info from navigator.userAgent. I think  
>> the fact that it's not exposed to CSS is by design - if CSS were  
>> allowed to have UA vendor/version targeted rules I think there are  
>> better ways to do it than by attributes on the root element.
> 
> Agree. Something like @media screen/webcore { ... } or
> @media screen/gecko { ... } blocks will definitely
> simplify life of Web devolopers. I would add in CSS ability
> to load scripts too through @include or @import at-rules and
> the whole system would be near the perfect.

What are the use cases for loading JS through CSS?  That strike me, at 
least superficially, as a bad design.


> In any case originally requested feature is here already
> through navigator.agent thing.

"navigator.userAgent" give you the UA string (name/version), it doesn't 
address my original requested feature at all.

Regards-
-Doug

www.schepers.cc

Received on Tuesday, 10 July 2007 21:54:43 UTC