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

Re: HTML Extensibility Through Script

From: Thomas Broyer <t.broyer@gmail.com>
Date: Tue, 10 Jul 2007 19:59:28 +0200
Message-ID: <a9699fd20707101059n18a57603n72388bba13977881@mail.gmail.com>
To: public-html@w3.org

2007/7/10, Andrew Fedoniouk:
>
> <script type="application/ecmascript">
>    if( featureXsupported() )
>        return;
>    // featureXemulation goes here.
> </script>
>
> or
>
> <script type="application/ecmascript">
>    if( !featureXsupported() ) include("featureXemulation.js");
> </script>

And featureXsupported() could be implemented as:
function featureXsupported()
{
    return document.implementation.hasFeature("org.w3c.dom.mathml", null);
}

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

Absolutely, except eventually if it mimics the DOM features, but for
backwards compatibility you'd still have to check with code, so I
don't think it's really needed.

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

And go back to "if (navigator.indexOf('MSIE') > 0) { /* it's IE */ }"
kind of things?

-- 
Thomas Broyer
Received on Tuesday, 10 July 2007 17:59:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:46 UTC