W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2013

[dom] Is it recommended to use Node.getFeature() or Node.isSupported()?

From: James Craig <jcraig@apple.com>
Date: Wed, 21 Aug 2013 17:03:03 -0700
Message-id: <B8EC9851-E450-4B8C-8D5D-57EF966D6DF0@apple.com>
Cc: Indie UI <public-indie-ui@w3.org>
To: www-dom@w3.org
DOM WG (cc IndieUI WG),

I recently noticed that DOM 4 effectively removed the functionality of DOMImplementation.hasFeature [1]

> [hasFeature] should no longer be used, but continues to exist (and simply returns true) "


Remaining in the spec (presumably still intended to work) but without much detail listed are Node.isSupported [2] and Node.getFeature [3]. Given that these methods are so similar to the functionality of DOMImplementation.hasFeature(), is it okay to rely on these?

As far as I can tell, there isn't a way to use standard object detection to allow authors to determine whether there is UA support for a particular type of event [4], so if these Node methods are no longer supported, please indicate the recommended way to allow feature detection of specific event types.

Thanks,
James Craig

1. http://www.w3.org/TR/domcore/#dom-domimplementation-hasfeature
2. http://www.w3.org/TR/domcore/#dom-node-issupported
3. http://www.w3.org/TR/domcore/#dom-node-getfeature
4. https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html#hasFeature
Received on Thursday, 22 August 2013 00:03:29 UTC

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