Specifications
The Dreamweaver Document Object Model 47
The dreamweaver and site objects
Dreamweaver implements the standard objects that are accessible through the DOM and adds
two custom objects:
dreamweaver and site. Both of these custom objects are widely used within
the APIs and in writing extensions. For additional information on the methods of the
dreamweaver and site objects, see “The Dreamweaver JavaScript API” on page 371.
Properties of the dreamweaver object
The
dreamweaver object has two read-only properties, as described in the following list:
• appName has the value "Dreamweaver".
• appVersion has a value of the form "versionNumber.releaseNumber.buildNumber
[languageCode] (platform)"
.
As an example, the value of the
appVersion property for the Swedish Windows version of
Dreamweaver MX would be
"6.0.XXXX [se] (Win32)"; the value for the English Macintosh
version would be
"6.0.XXXX [en] (MacPPC)".
Note: The build number for the version that comes as Dreamweaver MX was not known when this documentation
was printed. You can find the build number under Help > About.
The appName and appVersion properties were implemented in Dreamweaver 3 and are not
available in earlier versions of Dreamweaver. You might want to check whether the user of your
extension has Dreamweaver version 3 or later. To do this, check for the existence of the
appVersion or appName property.
To check for a specific version of Dreamweaver, check first for the existence of
appVersion and
then for the version number, as shown in the following example:
if (dreamweaver.appVersion && ¬
dreamweaver.appVersion.indexOf('3.01') != -1){
// execute code
}
The dreamweaver object has a property called systemScript that lets you query the language of
the user’s operating system. Use this property if you need to include special cases in your
extension code for localized operating systems, as shown in the following example:
if (dreamweaver,systemScript && (dreamweaver.systemScript.indexOf(’ja’)!=-1){
SpecialCase
}
systemScript returns the following values for localized operating systems:
Operating systems for all European languages return
’en’.
Language Value
Japanese ja
Korean ko
TChinese zh_tw
SChinese zh_cn