You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.


Embedding Gecko API


This interface manages a load group, which is a collection of nsIRequest objects. It is scriptable.


Adds a new request to the group. This will cause the default load flags to be applied to the request. If this is a foreground request then the groupObserver's onStartRequest will be called. If the request is the default load request or if the default load request is null, then the load group will inherit its load flags from the request.


void nsILoadGroup::addRequest(in nsIRequest aRequest,
	in nsISupports aContext) 


aRequest: The nsIRequest to be added.
aContext: A user defined context.


NS_OK if successful.

Removes a request from the group. If this is a foreground request then the groupObserver's onStopRequest will be called.


void nsILoadGroup::removeRequest(in nsIRequest aRequest,
	in nsISupports aContext,in nsresult aStatus) 


aRequest: The nsIRequest to be removed.
aContext: A user defined context.
aStatus: An error code with the reason for stopping, e.g. NS_BINDING_ABORTED if the request was canceled.


NS_OK if successful.
attribute nsIRequestObserver nsILoadGroup::groupObserver

Gets and sets the groupObserver. The groupObserver is notified when requests are added to and removed from this load group. It is weak referenced.

attribute nsIRequest nsILoadGroup::defaultLoadRequest

Gets and sets the default load request for the group. Each time a number of requests are added to a group, the defaultLoadRequest may be set to indicate that all of the requests are related to a base request. The load group inherits its load flags from the default load request. If the default load request is null, then the group's load flags are not changed.

readonly attribute nsISimpleEnumerator nsILoadGroup::requests

Gets the requests contained directly in this group. The elements of the enumerator are of the type nsIRequest.

readonly attribute unsigned long nsILoadGroup::activeCount

Gets the count of "active" requests (ie. requests without the LOAD_BACKGROUND bit set).

attribute nsIInterfaceRequestor nsILoadGroup::notificationCallbacks

Gets and sets the notification callbacks for the loadgroup.

Written by:Ellen Evans | Comments, questions, complaints? Bug 143387