Expand Minimize

hasFeature method

Returns a value that indicates whether the object implements a specific Document Object Model (DOM) standard.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4

Syntax

var retval = implementation.hasFeature(bstrfeature, version);

Parameters

bstrfeature [in]

Type: String

The name of the standard.

XML

DOM Core standard.

HTML

DOM HTML standard.

version [in, optional]

Type: Variant

The version number of the standard.

1.0

Level 1.

Return value

Type: Boolean

Returns one of the following possible values.
Return valueDescription
true

Standard is implemented.

false

Standard is not implemented.

 

Standards information

Remarks

The bstrfeature parameter is case-insensitive.

Examples

The following example uses the hasFeature method to test whether the object implements the DOM HTML standard.


var bSupported = document.implementation.hasFeature("HTML","1.0");

See also

implementation

 

 

Show:
© 2014 Microsoft