W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: HTML Extensibility Through Script

From: Doug Schepers <doug.schepers@vectoreal.com>
Date: Tue, 10 Jul 2007 17:54:29 -0400
Message-ID: <46940015.1020205@vectoreal.com>
To: public-html@w3.org

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.


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

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:24 UTC