nsIDOMWindowUtils.idl 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4. *
  5. * The contents of this file are subject to the Mozilla Public License Version
  6. * 1.1 (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. * http://www.mozilla.org/MPL/
  9. *
  10. * Software distributed under the License is distributed on an "AS IS" basis,
  11. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12. * for the specific language governing rights and limitations under the
  13. * License.
  14. *
  15. * The Original Code is mozilla.org code.
  16. *
  17. * The Initial Developer of the Original Code is
  18. * Mozilla.org
  19. * Portions created by the Initial Developer are Copyright (C) 2004
  20. * the Initial Developer. All Rights Reserved.
  21. *
  22. * Contributor(s):
  23. *
  24. * Alternatively, the contents of this file may be used under the terms of
  25. * either of the GNU General Public License Version 2 or later (the "GPL"),
  26. * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27. * in which case the provisions of the GPL or the LGPL are applicable instead
  28. * of those above. If you wish to allow use of your version of this file only
  29. * under the terms of either the GPL or the LGPL, and not to allow others to
  30. * use your version of this file under the terms of the MPL, indicate your
  31. * decision by deleting the provisions above and replace them with the notice
  32. * and other provisions required by the GPL or the LGPL. If you do not delete
  33. * the provisions above, a recipient may use your version of this file under
  34. * the terms of any one of the MPL, the GPL or the LGPL.
  35. *
  36. * ***** END LICENSE BLOCK ***** */
  37. #include "nsISupports.idl"
  38. /**
  39. * nsIDOMWindowUtils is intended for giving privileged script access to
  40. * additional properties and methods of nsIDOMWindow unavailable to
  41. * content script. Access this interface by calling getInterface on a DOMWindow.
  42. */
  43. [scriptable, uuid(8a157a4f-a81e-489f-baf2-bc8970d60472)]
  44. interface nsIDOMWindowUtils : nsISupports {
  45. /**
  46. * Image animation mode of the window. When this attribute's value
  47. * is changed, the implementation should set all images in the window
  48. * to the given value. That is, when set to kDontAnimMode, all images
  49. * will stop animating. The attribute's value must be one of the
  50. * animationMode values from imgIContainer.
  51. * @note Images may individually override the window's setting after
  52. * the window's mode is set. Therefore images given different modes
  53. * since the last setting of the window's mode may behave
  54. * out of line with the window's overall mode.
  55. * @note The attribute's value is the window's overall mode. It may
  56. * for example continue to report kDontAnimMode after all images
  57. * have subsequently been individually animated.
  58. * @note Only images immediately in this window are affected;
  59. * this is not recursive to subwindows.
  60. * @see imgIContainer
  61. */
  62. attribute unsigned short imageAnimationMode;
  63. /**
  64. * Function to get metadata associated with the window's current document
  65. * @param aName the name of the metadata. This should be all lowercase.
  66. * @return the value of the metadata, or the empty string if it's not set
  67. */
  68. AString getDocumentMetadata(in AString aName);
  69. };