Chapter 3 DynaScript Predefined Objects


DOMImplementation methods

The DOMImplementation object has these methods:

hasFeature method

Syntax

DOMImplementation.hasFeature( feature, version )

Description

Tests if the DOM implementation includes a specific feature. The parameters are:

Return

Boolean. True if the feature is implemented in the specified version, false otherwise.

Example

To write out the features supported by the Dynamo XML parser, enter:

domDoc = new DOMDocument();
implementation = domDoc.implementation;
document.writeln( "HTML? " + implementation.hasFeature( "HTML", "1.0" ) ) ;
document.writeln( "XML? " + implementation.hasFeature( "XML", "1.0" ) );

The output is:

HTML? false
XML? true

 


Copyright © 1999 Sybase, Inc. All rights reserved.