/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsISupports.idl" interface mozIDOMWindowProxy; interface nsIDOMElement; %{C++ #ifdef MOZILLA_INTERNAL_API #include "mozilla/BasePrincipal.h" // for DocShellOriginAttributes #endif %} /** * An nsILoadContext represents the context of a load. This interface * can be queried for various information about where the load is * happening. */ [scriptable, uuid(2813a7a3-d084-4d00-acd0-f76620315c02)] interface nsILoadContext : nsISupports { /** * 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 mozIDOMWindowProxy associatedWindow; /** * 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. */ readonly attribute mozIDOMWindowProxy topWindow; /** * topFrameElement is the