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

James Craig <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
On Aug 21, 2013, at 5:35 PM, "Tab Atkins Jr." <[email protected]> wrote:

> On Wed, Aug 21, 2013 at 5:03 PM, James Craig <[email protected]> wrote:
> 
>> 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?
> 
> No, use of these functions should be strongly discouraged.
> 
> Assuming you follow best practice of providing on* properties on the
> event sources, that's an easy way to detect event types.


Just to be clear, is this what you're recommending?

if (typeof document.body.ondismissrequest !== "undefined") {
	// okay to use dismissrequest
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.