Upgrading API Client to API v8.1
Besides some new capabilities, API v differs only minimally from API v8.0. As a result, clients can easily upgrade their API to take advantage of the new capabilities.
§ Upgrading a JavaScript Client
§ Property, Method, Event, and Interface Changes in API v8.1
Step 1: Instantiate an SGWorld instance instead of an SGWorld80 instance
When you initialize the SGWorld object by calling the initSGWorld function, you have the option to automatically use the latest version of SGWorld. To do this, simply use:
var SGWorld = initSGWorld("");
If you have done it this way, no updates are required in this step.
If, however you previously used another method such as the <object> tag to create SGWorld from a specific version or specified a particular version of SGWorld using its CLSID, like this:
var SGWorld = initSGWorld("[CLSID]");
Then you will to need update to the latest version in either of the following ways:
§ By passing an empty string "" in initSGWorld to get the latest version of SGWorld:
var SGWorld = initSGWorld("");
§ By updating the CLSID to reflect the latest version, i.e., 3A4F91A1-65A8-11D5-85C1-0001023952C1.
Step 2: Fix any changes related to modified/removed properties and methods
Since there are no types in JavaScript, you only need to consult the documentation regarding what was changed between v8.1 and v8.0. Unfortunately, unlike compiled languages, you do not have the compiler help in identifying those places. See “Property and Method Changes in API v8.1” in this chapter for more details.