Re: Detecting support for a given HTML5 feature through JS

Hi, Maciej-

Maciej Stachowiak wrote:
> 
> On Jul 15, 2007, at 3:21 PM, Doug Schepers wrote:
>> Henri Sivonen wrote:
>>> This is the best way because the test for the existence of the 
>>> implementation involves testing the implementation itself.
>>
>> In certain cases, this is a reasonable statement.  But it isn't 
>> universally applicable.  For instance, if you'll look at another 
>> MathML testcase [1], you'll see the problem.
> 
> Testing for the property or method directly is the best way to test for 
> DOM interfaces (it's more fine-grained than anything hasFeature will 
> give you) 

It's also more tedious, as I mentioned, but you're probably right that 
it can get more fine tuned.


> but it doesn't  seem that great a way to test for 
> implementation of markup interfaces and attributes. However, this is 
> only relevant for elements and attributes that have a rendering effect 
> which can't be seen in CSS, or a behavior effect that is not tied to any 
> scripting interfaces. For HTML5 itself, I think that is a pretty small 
> subset.

You mean, for the set of features included in HTML 5.0?  This is 
certainly applicable to them, but not exclusive to them.

HTML browsers are now, and will be for the foreseeable future, the 
primary way in which people interact with the Web.  HTML is thus a 
gateway language, and will probably serve as the medium for a mixture of 
other types of presentation content, such as MathML, SVG, and what have 
you.  The extensibility mechanism needed for a long-term language (which 
is what we're building, I hope) should be more flexible and more clear.

Again, this is a matter of paving the cowpaths; people are already 
providing scripted support for languages and features that only exist in 
certain browsers, and we need to have a way to make it easier for 
authors to use these libs.  It's the best way to innovate on the Web.

Regards-
-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI

Received on Monday, 16 July 2007 06:09:03 UTC