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

Re: HTML Extensibility Through Script

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 10 Jul 2007 09:17:20 -0700
Message-ID: <004301c7c30d$cade35a0$3501a8c0@TERRA>
To: "Doug Schepers" <doug.schepers@vectoreal.com>, <public-html@w3.org>


----- Original Message ----- 
From: "Doug Schepers" <doug.schepers@vectoreal.com>
To: <public-html@w3.org>
Sent: Tuesday, July 10, 2007 7:33 AM
Subject: HTML Extensibility Through Script


>... 
> The conversation then turned to how one might use this lib, given that 
> some browsers might support MathML natively and some not.  There was a 
> suggestion (a good one, I think) that a <script> element might be made 
> somehow conditional (through a parameter, an attribute, or through 
> encapsulation as the fallback for an <object>, doesn't matter to me), 
> such that if the browser supported a that feature natively, the script 
> implementation of that feature wouldn't run.
>

<script type="application/ecmascript">
   if( featureXsupported() )
       return;
   // featureXemulation goes here.
</script>

or 

<script type="application/ecmascript">
   if( !featureXsupported() ) include("featureXemulation.js");
</script>

It is IMO not realistic to have some universal attribute that 
will allow to filter all possible features of UA.

It would be nice though if UA vendors implement some
flag attribute like __ua_vendor/__ua_version  for the root element.
Such an attribute may be added while parsing DOM tree.
So scripts and CSS can reliably use it as a selector .

Andrew Fedoniouk.
http://terrainformatica.com
Received on Tuesday, 10 July 2007 16:18:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT