Universal Feature Detection

David Foley davi.fol at gmail.com
Wed Apr 29 04:47:31 PDT 2009


Please forgive me if I'm polluting the list, and re-direct me if I am,  
but considering that  there has been so much focus on browser  
implementation,  that JavaScript is also employable in various  
'environments' (IDE's, Servers etc.) and that all of these  
environments avail different features to developers, that a  
universal / standard feature detection API, perhaps through a  
standardised global Environment object, would be prudent.

Are there any plans to do such?

Such an object could be decoupled from vendor plug-in architectures,  
perhaps even providing an interface as simple as:

Environment.featureIsSupported(featureName:[String], featureVendor: 
[String, null], majorVersion:[Number, null], minorVersion:[Number,  
null], revision:[Number, null]) : Boolean

Of course, it would be up to vendors to decide just how the method  
would return true or false under certain conditions, but its not hard  
to see how such an interface could be useful to detect DOM  
capabilities, vendor plug-in availability or even native proprietary   
features supported by an 'environment'. A universal way to detect  
environmental variations would be a very useful thing, IMHO.

Best

David.




More information about the es-discuss mailing list