Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIScriptLoader Interface Reference

import "nsIScriptLoader.idl";

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

List of all members.

Public Member Functions

void init (in nsIDocument aDocument)
 Initialize loader with a document.
void dropDocumentReference ()
 The loader maintains a strong reference to the document with which it is initialized.
void addObserver (in nsIScriptLoaderObserver aObserver)
 Add an observer for all scripts loaded through this loader.
void removeObserver (in nsIScriptLoaderObserver aObserver)
 Remove an observer.
void processScriptElement (in nsIScriptElement aElement, in nsIScriptLoaderObserver aObserver)
 Process a script element.
nsIScriptElement getCurrentScript ()
 Gets the currently executing script.

Public Attributes

attribute boolean enabled
 Whether the loader is enabled or not.

Detailed Description

Definition at line 46 of file nsIScriptLoader.idl.


Member Function Documentation

Add an observer for all scripts loaded through this loader.

Parameters:
aObserverobserver for all script processing.

The loader maintains a strong reference to the document with which it is initialized.

This call forces the reference to be dropped.

Gets the currently executing script.

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

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.

Parameters:
aDocumentThe document to use as the basis for script processing.

Process a script element.

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

Parameters:
aElementThe element representing the script to be loaded and evaluated.
aObserverAn observer for this script load only

Remove an observer.

Parameters:
aObserverobserver to be removed

Member Data Documentation

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.

Definition at line 105 of file nsIScriptLoader.idl.


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