nsIWebBrowserSetup.idl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. *
  3. * This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. #include "nsISupports.idl"
  7. /**
  8. * The nsIWebBrowserSetup interface lets you set properties on a browser
  9. * object; you can do so at any time during the life cycle of the browser.
  10. *
  11. * @note Unless stated otherwise, settings are presumed to be enabled by
  12. * default.
  13. */
  14. [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)]
  15. interface nsIWebBrowserSetup : nsISupports
  16. {
  17. /**
  18. * Boolean. Enables/disables plugin support for this browser.
  19. *
  20. * @see setProperty
  21. */
  22. const unsigned long SETUP_ALLOW_PLUGINS = 1;
  23. /**
  24. * Boolean. Enables/disables Javascript support for this browser.
  25. *
  26. * @see setProperty
  27. */
  28. const unsigned long SETUP_ALLOW_JAVASCRIPT = 2;
  29. /**
  30. * Boolean. Enables/disables meta redirect support for this browser.
  31. * Meta redirect timers will be ignored if this option is disabled.
  32. *
  33. * @see setProperty
  34. */
  35. const unsigned long SETUP_ALLOW_META_REDIRECTS = 3;
  36. /**
  37. * Boolean. Enables/disables subframes within the browser
  38. *
  39. * @see setProperty
  40. */
  41. const unsigned long SETUP_ALLOW_SUBFRAMES = 4;
  42. /**
  43. * Boolean. Enables/disables image loading for this browser
  44. * window. If you disable the images, load a page, then enable the images,
  45. * the page will *not* automatically load the images for the previously
  46. * loaded page. This flag controls the state of a webBrowser at load time
  47. * and does not automatically re-load a page when the state is toggled.
  48. * Reloading must be done by hand, or by walking through the DOM tree and
  49. * re-setting the src attributes.
  50. *
  51. * @see setProperty
  52. */
  53. const unsigned long SETUP_ALLOW_IMAGES = 5;
  54. /**
  55. * Boolean. Enables/disables whether the document as a whole gets focus before
  56. * traversing the document's content, or after traversing its content.
  57. *
  58. * NOTE: this property is obsolete and now has no effect
  59. *
  60. * @see setProperty
  61. */
  62. const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6;
  63. /**
  64. * Boolean. Enables/disables the use of global history in the browser. Visited
  65. * URLs will not be recorded in the global history when it is disabled.
  66. *
  67. * @see setProperty
  68. */
  69. const unsigned long SETUP_USE_GLOBAL_HISTORY = 256;
  70. /**
  71. * Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
  72. * Default is PR_FALSE.
  73. *
  74. * @since mozilla1.0
  75. *
  76. * @see setProperty
  77. */
  78. const unsigned long SETUP_IS_CHROME_WRAPPER = 7;
  79. /**
  80. * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser.
  81. * This takes effect starting with the next pageload after the property is
  82. * set. The default is to not allow DNS prefetch, for backwards
  83. * compatibility.
  84. *
  85. * @see setProperty
  86. */
  87. const unsigned long SETUP_ALLOW_DNS_PREFETCH = 8;
  88. /**
  89. * Sets an integer or boolean property on the new web browser object.
  90. * Only PR_TRUE and PR_FALSE are legal boolean values.
  91. *
  92. * @param aId The identifier of the property to be set.
  93. * @param aValue The value of the property.
  94. */
  95. void setProperty(in unsigned long aId, in unsigned long aValue);
  96. };