Back to index

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

The JavaScript specific global object. More...

#include <nsIScriptGlobalObject.h>

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

List of all members.

Public Member Functions

virtual void SetContext (nsIScriptContext *aContext)=0
virtual nsIScriptContextGetContext ()=0
virtual nsresult SetNewDocument (nsIDOMDocument *aDocument, nsISupports *aState, PRBool aRemoveEventListeners, PRBool aClearScope)=0
virtual void SetDocShell (nsIDocShell *aDocShell)=0
virtual nsIDocShellGetDocShell ()=0
virtual void SetOpenerWindow (nsIDOMWindowInternal *aOpener)=0
virtual void SetGlobalObjectOwner (nsIScriptGlobalObjectOwner *aOwner)=0
 Let the script global object know who its owner is.
virtual
nsIScriptGlobalObjectOwner
GetGlobalObjectOwner ()=0
 Get the owner of the script global object.
virtual nsresult HandleDOMEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIDOMEvent **aDOMEvent, PRUint32 aFlags, nsEventStatus *aEventStatus)=0
virtual JSObjectGetGlobalJSObject ()=0
virtual void OnFinalize (JSObject *aJSObject)=0
 Called when the global JSObject is finalized.
virtual void SetScriptsEnabled (PRBool aEnabled, PRBool aFireTimeouts)=0
 Called to enable/disable scripts.
virtual nsresult SetNewArguments (PRUint32 aArgc, void *aArgv)=0
 Set a new arguments array for this window.

Detailed Description

The JavaScript specific global object.

This often used to store per-window global state.

Definition at line 63 of file nsIScriptGlobalObject.h.


Member Function Documentation

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

virtual nsIDocShell* nsIScriptGlobalObject::GetDocShell ( ) [pure virtual]

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

Get the owner of the script global object.

The method addrefs the returned reference according to regular XPCOM rules, even though the internal reference itself is a "weak" reference.

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

virtual nsresult nsIScriptGlobalObject::HandleDOMEvent ( nsPresContext aPresContext,
nsEvent aEvent,
nsIDOMEvent **  aDOMEvent,
PRUint32  aFlags,
nsEventStatus aEventStatus 
) [pure virtual]

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

virtual void nsIScriptGlobalObject::OnFinalize ( JSObject aJSObject) [pure virtual]

Called when the global JSObject is finalized.

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

virtual void nsIScriptGlobalObject::SetContext ( nsIScriptContext aContext) [pure virtual]

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:

virtual void nsIScriptGlobalObject::SetDocShell ( nsIDocShell aDocShell) [pure virtual]

Let the script global object know who its owner is.

The script global object should not addref the owner. It will be told when the owner goes away.

Returns:
NS_OK if the method is successful

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

virtual nsresult nsIScriptGlobalObject::SetNewArguments ( PRUint32  aArgc,
void aArgv 
) [pure virtual]

Set a new arguments array for this window.

This will be set on the window right away (if there's an existing document) and it will also be installed on the window when the next document is loaded. If argc is nonzero, argv must be non-null.

Parameters:
aArgcthe number of args
aArgvthe pointer to the args. This may be cast to jsval* and the args are found at ((jsval*)aArgv)[0], ..., ((jsval*)aArgv)[aArgc - 1]

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

virtual nsresult nsIScriptGlobalObject::SetNewDocument ( nsIDOMDocument aDocument,
nsISupports *  aState,
PRBool  aRemoveEventListeners,
PRBool  aClearScope 
) [pure virtual]
virtual void nsIScriptGlobalObject::SetOpenerWindow ( nsIDOMWindowInternal aOpener) [pure virtual]
virtual void nsIScriptGlobalObject::SetScriptsEnabled ( PRBool  aEnabled,
PRBool  aFireTimeouts 
) [pure virtual]

Called to enable/disable scripts.

Implemented in nsGlobalWindow, nsXULPDGlobalObject, and nsXBLDocGlobalObject.

Here is the caller graph for this function:


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