dom/webidl/HTMLObjectElement.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/HTMLObjectElement.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,211 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + *
     1.9 + * The origin of this IDL file is
    1.10 + * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
    1.11 + * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
    1.12 + *
    1.13 + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
    1.14 + * Opera Software ASA. You are granted a license to use, reproduce
    1.15 + * and create derivative works of this document.
    1.16 + */
    1.17 +
    1.18 +// http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
    1.19 +[NeedNewResolve]
    1.20 +interface HTMLObjectElement : HTMLElement {
    1.21 +  [Pure, SetterThrows]
    1.22 +           attribute DOMString data;
    1.23 +  [Pure, SetterThrows]
    1.24 +           attribute DOMString type;
    1.25 +  [Pure, SetterThrows]
    1.26 +           attribute boolean typeMustMatch;
    1.27 +  [Pure, SetterThrows]
    1.28 +           attribute DOMString name;
    1.29 +  [Pure, SetterThrows]
    1.30 +           attribute DOMString useMap;
    1.31 +  [Pure]
    1.32 +  readonly attribute HTMLFormElement? form;
    1.33 +  [Pure, SetterThrows]
    1.34 +           attribute DOMString width;
    1.35 +  [Pure, SetterThrows]
    1.36 +           attribute DOMString height;
    1.37 +  // Not pure: can trigger about:blank instantiation
    1.38 +  readonly attribute Document? contentDocument;
    1.39 +  // Not pure: can trigger about:blank instantiation
    1.40 +  readonly attribute WindowProxy? contentWindow;
    1.41 +
    1.42 +  readonly attribute boolean willValidate;
    1.43 +  readonly attribute ValidityState validity;
    1.44 +  readonly attribute DOMString validationMessage;
    1.45 +  boolean checkValidity();
    1.46 +  void setCustomValidity(DOMString error);
    1.47 +
    1.48 +  [Throws]
    1.49 +  legacycaller any (any... arguments);
    1.50 +};
    1.51 +
    1.52 +// http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
    1.53 +partial interface HTMLObjectElement {
    1.54 +  [Pure, SetterThrows]
    1.55 +           attribute DOMString align;
    1.56 +  [Pure, SetterThrows]
    1.57 +           attribute DOMString archive;
    1.58 +  [Pure, SetterThrows]
    1.59 +           attribute DOMString code;
    1.60 +  [Pure, SetterThrows]
    1.61 +           attribute boolean declare;
    1.62 +  [Pure, SetterThrows]
    1.63 +           attribute unsigned long hspace;
    1.64 +  [Pure, SetterThrows]
    1.65 +           attribute DOMString standby;
    1.66 +  [Pure, SetterThrows]
    1.67 +           attribute unsigned long vspace;
    1.68 +  [Pure, SetterThrows]
    1.69 +           attribute DOMString codeBase;
    1.70 +  [Pure, SetterThrows]
    1.71 +           attribute DOMString codeType;
    1.72 +
    1.73 +  [TreatNullAs=EmptyString, Pure, SetterThrows]
    1.74 +           attribute DOMString border;
    1.75 +};
    1.76 +
    1.77 +partial interface HTMLObjectElement {
    1.78 +  // GetSVGDocument
    1.79 +  Document? getSVGDocument();
    1.80 +};
    1.81 +
    1.82 +[NoInterfaceObject]
    1.83 +interface MozObjectLoadingContent {
    1.84 +  // Mirrored chrome-only scriptable nsIObjectLoadingContent methods.  Please
    1.85 +  // make sure to update this list if nsIObjectLoadingContent changes.  Also,
    1.86 +  // make sure everything on here is [ChromeOnly].
    1.87 +  [ChromeOnly]
    1.88 +  const unsigned long TYPE_LOADING  = 0;
    1.89 +  [ChromeOnly]
    1.90 +  const unsigned long TYPE_IMAGE    = 1;
    1.91 +  [ChromeOnly]
    1.92 +  const unsigned long TYPE_PLUGIN   = 2;
    1.93 +  [ChromeOnly]
    1.94 +  const unsigned long TYPE_DOCUMENT = 3;
    1.95 +  [ChromeOnly]
    1.96 +  const unsigned long TYPE_NULL     = 4;
    1.97 +
    1.98 +  // The content type is not supported (e.g. plugin not installed)
    1.99 +  [ChromeOnly]
   1.100 +  const unsigned long PLUGIN_UNSUPPORTED          = 0;
   1.101 +  // Showing alternate content
   1.102 +  [ChromeOnly]
   1.103 +  const unsigned long PLUGIN_ALTERNATE            = 1;
   1.104 +  // The plugin exists, but is disabled
   1.105 +  [ChromeOnly]
   1.106 +  const unsigned long PLUGIN_DISABLED             = 2;
   1.107 +  // The plugin is blocklisted and disabled
   1.108 +  [ChromeOnly]
   1.109 +  const unsigned long PLUGIN_BLOCKLISTED          = 3;
   1.110 +  // The plugin is considered outdated, but not disabled
   1.111 +  [ChromeOnly]
   1.112 +  const unsigned long PLUGIN_OUTDATED             = 4;
   1.113 +  // The plugin has crashed
   1.114 +  [ChromeOnly]
   1.115 +  const unsigned long PLUGIN_CRASHED              = 5;
   1.116 +  // Suppressed by security policy
   1.117 +  [ChromeOnly]
   1.118 +  const unsigned long PLUGIN_SUPPRESSED           = 6;
   1.119 +  // Blocked by content policy
   1.120 +  [ChromeOnly]
   1.121 +  const unsigned long PLUGIN_USER_DISABLED        = 7;
   1.122 +  /// ** All values >= PLUGIN_CLICK_TO_PLAY are plugin placeholder types that
   1.123 +  ///    would be replaced by a real plugin if activated (playPlugin())
   1.124 +  /// ** Furthermore, values >= PLUGIN_CLICK_TO_PLAY and
   1.125 +  ///    <= PLUGIN_VULNERABLE_NO_UPDATE are click-to-play types.
   1.126 +  // The plugin is disabled until the user clicks on it
   1.127 +  [ChromeOnly]
   1.128 +  const unsigned long PLUGIN_CLICK_TO_PLAY        = 8;
   1.129 +  // The plugin is vulnerable (update available)
   1.130 +  [ChromeOnly]
   1.131 +  const unsigned long PLUGIN_VULNERABLE_UPDATABLE = 9;
   1.132 +  // The plugin is vulnerable (no update available)
   1.133 +  [ChromeOnly]
   1.134 +  const unsigned long PLUGIN_VULNERABLE_NO_UPDATE = 10;
   1.135 +  // The plugin is in play preview mode
   1.136 +  [ChromeOnly]
   1.137 +  const unsigned long PLUGIN_PLAY_PREVIEW         = 11;
   1.138 +
   1.139 +  /**
   1.140 +   * The actual mime type (the one we got back from the network
   1.141 +   * request) for the element.
   1.142 +   */
   1.143 +  [ChromeOnly]
   1.144 +  readonly attribute DOMString actualType;
   1.145 +
   1.146 +  /**
   1.147 +   * Gets the type of the content that's currently loaded. See
   1.148 +   * the constants above for the list of possible values.
   1.149 +   */
   1.150 +  [ChromeOnly]
   1.151 +  readonly attribute unsigned long displayedType;
   1.152 +
   1.153 +  /**
   1.154 +   * Gets the content type that corresponds to the give MIME type.  See the
   1.155 +   * constants above for the list of possible values.  If nothing else fits,
   1.156 +   * TYPE_NULL will be returned.
   1.157 +   */
   1.158 +  [ChromeOnly]
   1.159 +  unsigned long getContentTypeForMIMEType(DOMString aMimeType);
   1.160 +
   1.161 +  /**
   1.162 +   * This method will play a plugin that has been stopped by the
   1.163 +   * click-to-play plugins or play-preview features.
   1.164 +   */
   1.165 +  [ChromeOnly, Throws]
   1.166 +  void playPlugin();
   1.167 +
   1.168 +  /**
   1.169 +   * Forces a re-evaluation and reload of the tag, optionally invalidating its
   1.170 +   * click-to-play state.  This can be used when the MIME type that provides a
   1.171 +   * type has changed, for instance, to force the tag to re-evalulate the
   1.172 +   * handler to use.
   1.173 +   */
   1.174 +  [ChromeOnly, Throws]
   1.175 +  void reload(boolean aClearActivation);
   1.176 +
   1.177 +  /**
   1.178 +   * This attribute will return true if the current content type has been
   1.179 +   * activated, either explicitly or by passing checks that would have it be
   1.180 +   * click-to-play or play-preview.
   1.181 +   */
   1.182 +  [ChromeOnly]
   1.183 +  readonly attribute boolean activated;
   1.184 +
   1.185 +  /**
   1.186 +   * The URL of the data/src loaded in the object. This may be null (i.e.
   1.187 +   * an <embed> with no src).
   1.188 +   */
   1.189 +  [ChromeOnly]
   1.190 +  readonly attribute URI? srcURI;
   1.191 +
   1.192 +  [ChromeOnly]
   1.193 +  readonly attribute unsigned long defaultFallbackType;
   1.194 +
   1.195 +  [ChromeOnly]
   1.196 +  readonly attribute unsigned long pluginFallbackType;
   1.197 +
   1.198 +  /**
   1.199 +   * If this object currently owns a running plugin, regardless of whether or
   1.200 +   * not one is pending spawn/despawn.
   1.201 +   */
   1.202 +  [ChromeOnly]
   1.203 +  readonly attribute boolean hasRunningPlugin;
   1.204 +
   1.205 +  /**
   1.206 +   * This method will disable the play-preview plugin state.
   1.207 +   */
   1.208 +  [ChromeOnly, Throws]
   1.209 +  void cancelPlayPreview();
   1.210 +};
   1.211 +
   1.212 +HTMLObjectElement implements MozImageLoadingContent;
   1.213 +HTMLObjectElement implements MozFrameLoaderOwner;
   1.214 +HTMLObjectElement implements MozObjectLoadingContent;

mercurial