1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
8 * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
10 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
11 * Opera Software ASA. You are granted a license to use, reproduce
12 * and create derivative works of this document.
15 // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
18 interface HTMLObjectElement : HTMLElement {
19 [HTMLConstructor] constructor();
21 [CEReactions, Pure, SetterThrows]
22 attribute DOMString data;
23 [CEReactions, Pure, SetterThrows]
24 attribute DOMString type;
25 [CEReactions, Pure, SetterThrows]
26 attribute DOMString name;
27 [CEReactions, Pure, SetterThrows]
28 attribute DOMString useMap;
30 readonly attribute HTMLFormElement? form;
31 [CEReactions, Pure, SetterThrows]
32 attribute DOMString width;
33 [CEReactions, Pure, SetterThrows]
34 attribute DOMString height;
35 // Not pure: can trigger about:blank instantiation
36 [NeedsSubjectPrincipal]
37 readonly attribute Document? contentDocument;
38 // Not pure: can trigger about:blank instantiation
39 [NeedsSubjectPrincipal]
40 readonly attribute WindowProxy? contentWindow;
42 readonly attribute boolean willValidate;
43 readonly attribute ValidityState validity;
45 readonly attribute DOMString validationMessage;
46 boolean checkValidity();
47 boolean reportValidity();
48 undefined setCustomValidity(DOMString error);
51 // http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
52 partial interface HTMLObjectElement {
53 [CEReactions, Pure, SetterThrows]
54 attribute DOMString align;
55 [CEReactions, Pure, SetterThrows]
56 attribute DOMString archive;
57 [CEReactions, Pure, SetterThrows]
58 attribute DOMString code;
59 [CEReactions, Pure, SetterThrows]
60 attribute boolean declare;
61 [CEReactions, Pure, SetterThrows]
62 attribute unsigned long hspace;
63 [CEReactions, Pure, SetterThrows]
64 attribute DOMString standby;
65 [CEReactions, Pure, SetterThrows]
66 attribute unsigned long vspace;
67 [CEReactions, Pure, SetterThrows]
68 attribute DOMString codeBase;
69 [CEReactions, Pure, SetterThrows]
70 attribute DOMString codeType;
72 [CEReactions, Pure, SetterThrows]
73 attribute [LegacyNullToEmptyString] DOMString border;
76 partial interface HTMLObjectElement {
78 [NeedsSubjectPrincipal]
79 Document? getSVGDocument();
82 interface mixin MozObjectLoadingContent {
83 // Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please
84 // make sure to update this list if nsIObjectLoadingContent changes. Also,
85 // make sure everything on here is [ChromeOnly].
87 const unsigned long TYPE_LOADING = 0;
89 const unsigned long TYPE_IMAGE = 1;
91 const unsigned long TYPE_FALLBACK = 2;
93 const unsigned long TYPE_FAKE_PLUGIN = 3;
95 const unsigned long TYPE_DOCUMENT = 4;
97 const unsigned long TYPE_NULL = 5;
100 * The actual mime type (the one we got back from the network
101 * request) for the element.
104 readonly attribute DOMString actualType;
107 * Gets the type of the content that's currently loaded. See
108 * the constants above for the list of possible values.
111 readonly attribute unsigned long displayedType;
114 * Gets the content type that corresponds to the give MIME type. See the
115 * constants above for the list of possible values. If nothing else fits,
116 * TYPE_NULL will be returned.
119 unsigned long getContentTypeForMIMEType(DOMString aMimeType);
123 sequence<MozPluginParameter> getPluginAttributes();
126 sequence<MozPluginParameter> getPluginParameters();
129 * Forces a re-evaluation and reload of the tag, optionally invalidating its
130 * click-to-play state. This can be used when the MIME type that provides a
131 * type has changed, for instance, to force the tag to re-evalulate the
135 undefined reload(boolean aClearActivation);
138 * The URL of the data/src loaded in the object. This may be null (i.e.
139 * an <embed> with no src).
142 readonly attribute URI? srcURI;
145 * Disable the use of fake plugins and reload the tag if necessary
148 undefined skipFakePlugins();
150 [ChromeOnly, Throws, NeedsCallerType]
151 readonly attribute unsigned long runID;
155 * Name:Value pair type used for passing parameters to NPAPI or javascript
158 dictionary MozPluginParameter {
160 DOMString value = "";
163 HTMLObjectElement includes MozImageLoadingContent;
164 HTMLObjectElement includes MozFrameLoaderOwner;
165 HTMLObjectElement includes MozObjectLoadingContent;