nsIJSID 编辑
js/src/xpconnect/idl/xpcjsid.idl
Scriptable 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 |
| 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
.
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
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论