Re: hasFeature revisited

On Apr 15, 2013, at 9:48 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> Used the wrong mailing list for SVG...
> 
> ---------- Forwarded message ----------
> On Mon, Apr 15, 2013 at 4:30 PM, Simon Pieters <simonp@opera.com> wrote:
>> How many sites are we talking about here? From what I can tell, the site
>> referenced in the bug report has been fixed. With no other known sites being
>> affected, I suggest we keep the spec as is for now.
>> 
>> I tried searching http://webdevdata.org/ data-dec2012.zip for
>> ".createLSParser(", no results, and ".hasFeature(" only had "XPath" and two
>> SVG features. Although the data set is limited, of course, so it doesn't
>> tell us much.
> 
> SVG guys, what are you doing with feature strings these days? Has the
> time come where it can be completely obsoleted? Having hasFeature()
> simply always return true, without an exception for SVG, would be even
> better I think. See also:
> http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature

In SVG hasFeature() is used for feature detection. You can ask for support of shapes, fonts, filters and and a couple of dozen more features. At least for WebKit and Blink these information should be reliable. For at least 10 features the implementations returns false. If certain features like SVG Filters, SVG Animations or SVG Fonts are not enabled in a WebKit/Blink based browser, the method returns false for these features as well.

The SVG WG can't give any comments on the usage of this method in the wild. My recommendation is a real world measuring of the usage by browser vendors (not just checking the top 10k websites). I have an action to ask the Blink community to add instrumentations for hasFeature(). If the community accepts this and I can land a patch for Blink, we should have data in the next 3-5 months.

Greetings,
Dirk


> 
> 
> --
> http://annevankesteren.nl/
> 

Received on Friday, 26 April 2013 01:53:23 UTC