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

Re: HTML Extensibility Through Script

From: Doug Schepers <schepers@w3.org>
Date: Fri, 13 Jul 2007 17:51:18 -0400
Message-ID: <4697F3D6.7000609@w3.org>
To: Jon Barnett <jonbarnett@gmail.com>
CC: public-html@w3.org

Hi, Jon-

Jon Barnett wrote:
> On 7/10/07, Doug Schepers <doug.schepers@vectoreal.com> wrote:
>>
>> This seems to have drifted off-topic rather quickly... To refocus, I
>> wasn't asking for a way to sniff browser strings, which is a brittle way
>> to determine the featureset of the UA.  I intended this thread to
>> discuss the possibility of conditional operators, either through a
>> script API or (preferably) via a declarative markup or featurestring.
> 
> Is there a use case that isn't covered by DOMImplementation.hasFeature()?

Possibly not.  Honestly, I hadn't considered "hasFeature()" for this, 
though I agree it does fit the bill for the scripted API, assuming that 
it is properly supported (see below).

I still think that a declarative 'switch' feature or the like is a 
better choice, more generic, more powerful than a simple fallback 
mechanism, and doesn't rely on scripting (which in this case is not 
important, but...).


> For example, is there a UA that would render MathML, and support scripting,
> but not respond correctly to .hasFeature("org.w3c.dom.mathml", null); ?

Yes, Firefox 2.0.  It does support XHTML+MathML, but mysteriously claims 
not to [1].  In this case, for the sake of providing scripted 
implementation extensions/fallbacks, this is as bad as not supporting it 
in the first place, and possibly even worse, because the results will 
now be unpredictable.

Of course, .hasFeature is not perfect under the best of circumstances... 
if the implementation has only partial support, or flawed support, then 
it's unclear how it should reply.  SVG partly solves this by having lots 
of featurestrings, but it doesn't account for flawed support.

I'll keep trying to come up with a better solution, but it's a hard problem.


[1] http://www.schepers.cc/standards/MathML/mathMLTest.xhtml

Regards-
-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI
Received on Friday, 13 July 2007 21:51:35 UTC

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