Adobe Extending Dreamweaver CS4 Manuel d'utilisateur Page 109

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 387
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 108
103
EXTENDING DREAMWEAVER CS4
The Dreamweaver Document Object Model
The dreamweaver and site objects
Dreamweaver implements the standard objects that are accessible through the DOM and adds two custom objects:
dreamweaver and site. These custom objects are widely used within the APIs and in writing extensions. For more
information on the methods of the
dreamweaver and site objects, see the Dreamweaver API Reference.
Properties of the dreamweaver object
The dreamweaver object has two read-only properties, which are described in the following list:
The appName property has the value "Dreamweaver".
The appVersion property 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 is
"8.0.XXXX [se] (Win32)"; the value for the English Macintosh version is "8.0.XXXX [en] (MacPPC)".
Note: You can find the version and build number by selecting the Help > About menu item.
The appName and appVersion properties were implemented in Dreamweaver 3 and are not available in earlier
versions of Dreamweaver.
To find the 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 }
The systemScript property returns the following values for localized operating systems:
Operating systems for all European languages return 'en'.
The site object
The site object has no properties. For information about the methods of the site object, see the Dreamweaver API
Reference.
Language Value
Japanese ja
Korean ko
TChinese zh_tw
SChinese zh_cn
Vue de la page 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 386 387

Commentaires sur ces manuels

Pas de commentaire