mozilla

Revision 199747 of element.supports

  • Revision slug: DOM/element.supports
  • Revision title: element.supports
  • Revision id: 199747
  • Created:
  • Creator: JesseW
  • Is current revision? No
  • Comment I think this will have to be moved to document.supports, right?

Revision Content

Summary

The supports method tests if this DOM implementation supports a particular feature.

Syntax

boolean = element.supports(feature{{mediawiki.external(', version')}})

Parameters

feature is a string that contains the name of the feature (e.g., "") version is a string containing the version number of the feature.

Example

if ( document.supports("package", "4.0") ) {     // do something that only package 4.0 allows }

Notes

If version is not supplied, the method returns true is any version of the specified feature is supported.

Specification

Not part of the specification.

Revision Source

<p>
</p>
<h3 name="Summary">Summary</h3>
<p>The supports method tests if this DOM implementation supports a particular feature. 
</p>
<h3 name="Syntax">Syntax </h3>
<p>boolean = element.supports(feature{{mediawiki.external(', version')}}) 
</p>
<h3 name="Parameters">Parameters </h3>
<p>feature is a string that contains the name of the feature (e.g., "")
version is a string containing the version number of the feature.
</p>
<h3 name="Example">Example </h3>
<pre>if ( document.supports("package", "4.0") ) {     // do something that only package 4.0 allows }

</pre>
<h3 name="Notes">Notes </h3>
<p>If version is not supplied, the method returns true is any version of the specified feature is supported. 
</p>
<h3 name="Specification">Specification </h3>
<p>Not part of the specification.
</p>
Revert to this revision