Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIScriptObjectOwner Class Reference

Creates a link between the script object and its native implementation. More...

#include <nsIScriptObjectOwner.h>

Inheritance diagram for nsIScriptObjectOwner:
Inheritance graph
[legend]
Collaboration diagram for nsIScriptObjectOwner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_IMETHOD GetScriptObject (nsIScriptContext *aContext, void **aScriptObject)=0
 Return the script object associated with this object.
NS_IMETHOD SetScriptObject (void *aScriptObject)=0
 Set the script object associated with this object.

Detailed Description

Creates a link between the script object and its native implementation.

Every object that wants to be exposed in a script environment should implement this interface. This interface should guarantee that the same script object is returned in the context of the same script.

It does have a bit too much java script information now, that should be removed in a short time. Ideally this interface will be language neutral

Definition at line 60 of file nsIScriptObjectOwner.h.


Member Function Documentation

NS_IMETHOD nsIScriptObjectOwner::GetScriptObject ( nsIScriptContext aContext,
void **  aScriptObject 
) [pure virtual]

Return the script object associated with this object.

Create a script object if not present.

Parameters:
aContextthe context the script object has to be created in
aScriptObjecton return will contain the script object
Returns:
nsresult NS_OK if the script object is successfully returned
NS_IMETHOD nsIScriptObjectOwner::SetScriptObject ( void aScriptObject) [pure virtual]

Set the script object associated with this object.

Often used to either reset the object to null or initially set it in cases where the object comes before the owner.

Parameters:
aScriptObjectthe script object to set
Returns:
nsresult NS_OK if the script object is successfully set

The documentation for this class was generated from the following file: