Inherits From:nsISupports


PRBool enabled

Whether the loader is enabled or not. When disabled, processing of new script elements is disabled. Any call to processScriptElement() will fail with a return code of NS_ERROR_NOT_AVAILABLE. Note that this DOES NOT disable currently loading or executing scripts.


void addObserver ( nsIScriptLoaderObserver observer ) void dropDocumentReference ( ) nsIScriptElement getCurrentScript ( ) void init ( nsIDocument document ) void processScriptElement ( nsIScriptElement element , nsIScriptLoaderObserver observer ) void removeObserver ( nsIScriptLoaderObserver observer )

void addObserver ( nsIScriptLoaderObserver observer )

Add an observer for all scripts loaded through this loader.

observer: observer for all script processing.

void dropDocumentReference ( )

The loader maintains a strong reference to the document with which it is initialized. This call forces the reference to be dropped.

nsIScriptElement getCurrentScript ( )

Gets the currently executing script. This is useful if you want to generate a unique key based on the currently executing script.

void init ( nsIDocument document )

Initialize loader with a document. The container of this document will be used for getting script evaluation information, including the context in which to do the evaluation. The loader maintains a strong reference to the document.

document: The document to use as the basis for script processing.

void processScriptElement ( nsIScriptElement element , nsIScriptLoaderObserver observer )

Process a script element. This will include both loading the source of the element if it is not inline and evaluating the script itself.

element: The element representing the script to be loaded and evaluated.
observer: An observer for this script load only

void removeObserver ( nsIScriptLoaderObserver observer )

Remove an observer.

observer: observer to be removed

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com