- From: Thomas Broyer <t.broyer@gmail.com>
- Date: Tue, 10 Jul 2007 19:59:28 +0200
- 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