new ActiveXObject (( name [, location]) )

When the ActiveXObject constructor is called with one or more arguments, the following steps are taken:

1. Call toPrimitive(name, hint Number).

2. If the type of Result(1) is not String, raise a TypeError exception.

3. If Result(1) is an empty string, raise a TypeError exception.

4. If location is not present, go to step 7.

5. Call toPrimitive(location, hint Number).

6. If the type of Result(5) is not String, raise a TypeError exception.

7. Attempt to create a host object than can be used to communicate with the application and application-specific object identified by the String Result(1). If location was present, Result(5) identifies the server where the application resides; otherwise, the default server (the current machine) is used as the location of the application.

8. If any error occurs during Step 7, such that the host object cannot be created, raise an Error exception.

9. Return Result(7)

The format of the string values passed as arguments to this constructor are defined by the host operating system.

The object returned by this constructor is a host object. It is not an instance of ActiveXObject and does not inherit properties from the ActiveXObject prototype object or from Object.prototype. The specific properties of such objects will vary and are dependent upon the specific argument values passed to this constructor.