Chapter 3 DynaScript Predefined Objects
Provides a means of querying the capabilities of this application's implementation of DOM.
To use a DOMImplementation's method:
DOMImplementation.MethodName( parameter )
The DOMImplementation
object
has one method used to query the features supported by this specific
implementation of DOM. This method is independent of any particular
instance of a DOMDocument
.
Dynamo's current implementation of DOM supports parsing of XML 1.0 documents according to DOM Level 1.
DOMImplementation.hasFeature( feature, version )
Tests if the DOM implementation includes a specific feature. The parameters are:
Boolean. True if the feature is implemented in the specified version, false otherwise.
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 © 2001 Sybase, Inc. All rights reserved. |
![]() |