michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial michael@0: * michael@0: * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and michael@0: * Opera Software ASA. You are granted a license to use, reproduce michael@0: * and create derivative works of this document. michael@0: */ michael@0: michael@0: // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element michael@0: [NeedNewResolve] michael@0: interface HTMLObjectElement : HTMLElement { michael@0: [Pure, SetterThrows] michael@0: attribute DOMString data; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString type; michael@0: [Pure, SetterThrows] michael@0: attribute boolean typeMustMatch; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString name; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString useMap; michael@0: [Pure] michael@0: readonly attribute HTMLFormElement? form; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString width; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString height; michael@0: // Not pure: can trigger about:blank instantiation michael@0: readonly attribute Document? contentDocument; michael@0: // Not pure: can trigger about:blank instantiation michael@0: readonly attribute WindowProxy? contentWindow; michael@0: michael@0: readonly attribute boolean willValidate; michael@0: readonly attribute ValidityState validity; michael@0: readonly attribute DOMString validationMessage; michael@0: boolean checkValidity(); michael@0: void setCustomValidity(DOMString error); michael@0: michael@0: [Throws] michael@0: legacycaller any (any... arguments); michael@0: }; michael@0: michael@0: // http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial michael@0: partial interface HTMLObjectElement { michael@0: [Pure, SetterThrows] michael@0: attribute DOMString align; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString archive; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString code; michael@0: [Pure, SetterThrows] michael@0: attribute boolean declare; michael@0: [Pure, SetterThrows] michael@0: attribute unsigned long hspace; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString standby; michael@0: [Pure, SetterThrows] michael@0: attribute unsigned long vspace; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString codeBase; michael@0: [Pure, SetterThrows] michael@0: attribute DOMString codeType; michael@0: michael@0: [TreatNullAs=EmptyString, Pure, SetterThrows] michael@0: attribute DOMString border; michael@0: }; michael@0: michael@0: partial interface HTMLObjectElement { michael@0: // GetSVGDocument michael@0: Document? getSVGDocument(); michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface MozObjectLoadingContent { michael@0: // Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please michael@0: // make sure to update this list if nsIObjectLoadingContent changes. Also, michael@0: // make sure everything on here is [ChromeOnly]. michael@0: [ChromeOnly] michael@0: const unsigned long TYPE_LOADING = 0; michael@0: [ChromeOnly] michael@0: const unsigned long TYPE_IMAGE = 1; michael@0: [ChromeOnly] michael@0: const unsigned long TYPE_PLUGIN = 2; michael@0: [ChromeOnly] michael@0: const unsigned long TYPE_DOCUMENT = 3; michael@0: [ChromeOnly] michael@0: const unsigned long TYPE_NULL = 4; michael@0: michael@0: // The content type is not supported (e.g. plugin not installed) michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_UNSUPPORTED = 0; michael@0: // Showing alternate content michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_ALTERNATE = 1; michael@0: // The plugin exists, but is disabled michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_DISABLED = 2; michael@0: // The plugin is blocklisted and disabled michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_BLOCKLISTED = 3; michael@0: // The plugin is considered outdated, but not disabled michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_OUTDATED = 4; michael@0: // The plugin has crashed michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_CRASHED = 5; michael@0: // Suppressed by security policy michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_SUPPRESSED = 6; michael@0: // Blocked by content policy michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_USER_DISABLED = 7; michael@0: /// ** All values >= PLUGIN_CLICK_TO_PLAY are plugin placeholder types that michael@0: /// would be replaced by a real plugin if activated (playPlugin()) michael@0: /// ** Furthermore, values >= PLUGIN_CLICK_TO_PLAY and michael@0: /// <= PLUGIN_VULNERABLE_NO_UPDATE are click-to-play types. michael@0: // The plugin is disabled until the user clicks on it michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_CLICK_TO_PLAY = 8; michael@0: // The plugin is vulnerable (update available) michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_VULNERABLE_UPDATABLE = 9; michael@0: // The plugin is vulnerable (no update available) michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_VULNERABLE_NO_UPDATE = 10; michael@0: // The plugin is in play preview mode michael@0: [ChromeOnly] michael@0: const unsigned long PLUGIN_PLAY_PREVIEW = 11; michael@0: michael@0: /** michael@0: * The actual mime type (the one we got back from the network michael@0: * request) for the element. michael@0: */ michael@0: [ChromeOnly] michael@0: readonly attribute DOMString actualType; michael@0: michael@0: /** michael@0: * Gets the type of the content that's currently loaded. See michael@0: * the constants above for the list of possible values. michael@0: */ michael@0: [ChromeOnly] michael@0: readonly attribute unsigned long displayedType; michael@0: michael@0: /** michael@0: * Gets the content type that corresponds to the give MIME type. See the michael@0: * constants above for the list of possible values. If nothing else fits, michael@0: * TYPE_NULL will be returned. michael@0: */ michael@0: [ChromeOnly] michael@0: unsigned long getContentTypeForMIMEType(DOMString aMimeType); michael@0: michael@0: /** michael@0: * This method will play a plugin that has been stopped by the michael@0: * click-to-play plugins or play-preview features. michael@0: */ michael@0: [ChromeOnly, Throws] michael@0: void playPlugin(); michael@0: michael@0: /** michael@0: * Forces a re-evaluation and reload of the tag, optionally invalidating its michael@0: * click-to-play state. This can be used when the MIME type that provides a michael@0: * type has changed, for instance, to force the tag to re-evalulate the michael@0: * handler to use. michael@0: */ michael@0: [ChromeOnly, Throws] michael@0: void reload(boolean aClearActivation); michael@0: michael@0: /** michael@0: * This attribute will return true if the current content type has been michael@0: * activated, either explicitly or by passing checks that would have it be michael@0: * click-to-play or play-preview. michael@0: */ michael@0: [ChromeOnly] michael@0: readonly attribute boolean activated; michael@0: michael@0: /** michael@0: * The URL of the data/src loaded in the object. This may be null (i.e. michael@0: * an with no src). michael@0: */ michael@0: [ChromeOnly] michael@0: readonly attribute URI? srcURI; michael@0: michael@0: [ChromeOnly] michael@0: readonly attribute unsigned long defaultFallbackType; michael@0: michael@0: [ChromeOnly] michael@0: readonly attribute unsigned long pluginFallbackType; michael@0: michael@0: /** michael@0: * If this object currently owns a running plugin, regardless of whether or michael@0: * not one is pending spawn/despawn. michael@0: */ michael@0: [ChromeOnly] michael@0: readonly attribute boolean hasRunningPlugin; michael@0: michael@0: /** michael@0: * This method will disable the play-preview plugin state. michael@0: */ michael@0: [ChromeOnly, Throws] michael@0: void cancelPlayPreview(); michael@0: }; michael@0: michael@0: HTMLObjectElement implements MozImageLoadingContent; michael@0: HTMLObjectElement implements MozFrameLoaderOwner; michael@0: HTMLObjectElement implements MozObjectLoadingContent;