W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

Re: hasFeature revisited

From: Dirk Schulze <dschulze@adobe.com>
Date: Thu, 25 Apr 2013 18:52:48 -0700
To: Anne van Kesteren <annevk@annevk.nl>
CC: www-svg <www-svg@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <E11909E9-732B-4B9D-ADA5-1F417B12BBFA@adobe.com>

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.


> --
> http://annevankesteren.nl/
Received on Friday, 26 April 2013 01:53:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:02 UTC