Public Member Functions | Public Attributes

nsILoadContext Interface Reference

An nsILoadContext represents the context of a load. More...

import "nsILoadContext.idl";

Collaboration diagram for nsILoadContext:

List of all members.

Public Member Functions

boolean isAppOfType (in unsigned long appType)
 Check whether the load is happening in a particular type of application.

Public Attributes

readonly attribute nsIDOMWindow associatedWindow
 associatedWindow is the window with which the load is associated, if any.
readonly attribute nsIDOMWindow topWindow
 topWindow is the top window which is of same type as associatedWindow.
readonly attribute boolean isContent
 True if the load context is content (as opposed to chrome).

Detailed Description

An nsILoadContext represents the context of a load.

This interface can be queried for various information about where the load is happening.


Member Function Documentation

boolean nsILoadContext::isAppOfType ( in unsigned long  appType  ) 

Check whether the load is happening in a particular type of application.

Parameters:
an application type. For now, the constants to be passed here are the nsIDocShell APP_TYPE_* constants.
Returns:
whether there is some ancestor of the associatedWindow that is of the given app type.

Member Data Documentation

associatedWindow is the window with which the load is associated, if any.

Note that the load may be triggered by a document which is different from the document in associatedWindow, and in fact the source of the load need not be same-origin with the document in associatedWindow. This attribute may be null if there is no associated window.

readonly attribute boolean nsILoadContext::isContent

True if the load context is content (as opposed to chrome).

This is determined based on the type of window the load is performed in, NOT based on any URIs that might be around.

topWindow is the top window which is of same type as associatedWindow.

This is equivalent to associatedWindow.top, but is provided here as a convenience. All the same caveats as associatedWindow of apply, of course. This attribute may be null if there is no associated window.


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