nsIJSID

This interface provides information about a contract or interface.
Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3)

The following methods return objects that implement this interface:

Components.interfaces.name
Components.classes[contract]
Components.interfacesById[uuid]
Components.classesById[cid]

The first two cases create a named JSID while the last two cases create an unnamed JSID. An unnamed JSID also results when you implement a function that is passed an nsIIDRef parameter, such as QueryInterface(). Note that for these cases of JSID the specified class or interface must exist and be scriptable.

Method overview

boolean equals(in nsIJSID other);
const nsID* getID(); Violates the XPCOM interface guidelines
void initialize(in string idString);
string toString();

Attributes

Attribute Type Description
id nsIDPtr Read only. Native code only! Obsolete since Gecko 1.9 The internal nsID.
name string Read only. The name of the JSID, if it was set.
number string Read only. The string representation of the internal nsID.
valid boolean Read only. Returns true if the JSID has been initialised.

Methods

equals()

This method determines if this nsIJSID has the same nsID as another nsIJSID.

boolean equals(
  in nsIJSID other
);
Parameters
other
The other nsIJSID to compare to.
Return value

true if the nsIJSID's are valid and have the same nsID, otherwise false.

Violates the XPCOM interface guidelines

getID()

const nsID* getID();
Parameters

None.

Return value

A pointer to the internal nsID structure.

initialize()

Initializes the JSID.

void initialize(
  in string idString
);
Parameters
idString
The number to initialize the JSID, in string format, e.g. {00000000-0000-0000-c000-000000000046}. A JSID can only be initialized once.

toString()

This methods returns a string representation of the object.

string toString();
Parameters

None.

Return value

The name of the JSID if it has one, otherwise the string representation of its nsID.

Document Tags and Contributors

 Contributors to this page: Sheppy, Neil, trevorh, Andreas Wuest
 Last updated by: Sheppy,