summaryrefslogtreecommitdiffstats
path: root/dom/base/nsIObjectLoadingContent.idl
blob: a397699c0bda411720e483e81b5c6e5ef1133ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* -*- 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 nsIChannel;
interface nsIRequest;
interface nsIFrame;
interface nsIURI;

webidl BrowsingContext;

/**
 * This interface represents a content node that loads objects.
 *
 * Please make sure to update the MozObjectLoadingContent WebIDL
 * mixin to mirror this interface when changing it.
 */

[scriptable, builtinclass, uuid(2eb3195e-3eea-4083-bb1d-d2d70fa35ccb)]
interface nsIObjectLoadingContent : nsISupports
{
  /**
   * See notes in nsObjectLoadingContent.h
   */
  const unsigned long TYPE_LOADING     = 0;
  const unsigned long TYPE_DOCUMENT    = 1;
  const unsigned long TYPE_FALLBACK    = 2;

  /**
   * The actual mime type (the one we got back from the network
   * request) for the element.
   */
  readonly attribute ACString actualType;

  /**
   * Gets the type of the content that's currently loaded. See
   * the constants above for the list of possible values.
   */
  readonly attribute unsigned long displayedType;

  /**
   * The URL of the data/src loaded in the object. This may be null (i.e.
   * an <embed> with no src).
   */
  readonly attribute nsIURI srcURI;

  /**
   * Switch the tag into the TYPE_DOCUMENT state, and returns the
   * BrowsingContext which the load should complete in.
   */
  [noscript] BrowsingContext upgradeLoadToDocument(in nsIChannel channel);
};