mozilla

Revision 68670 of Using preferences from application code

  • Revision slug: Mozilla/Preferences/Using_preferences_from_application_code
  • Revision title: Using preferences from application code
  • Revision id: 68670
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment initial draft, more coming shortly; page created, 110 words added

Revision Content

{{ gecko_minversion_header("6.0") }}

{{ draft() }}

Firefox 6 introduced static functions, as part of the C++ Preferences class, for accessing preferences efficiently from within application code. This API is not available for add-ons, but if you're working on a Gecko application, this API is the preferred way to access preferences.

Due to the relatively limited target audience for this API, we don't have a thorough API reference at this time (although if you have some time, feel free to add one!). The examples below and the self-explanatory nature of most of the API should do the trick. Take a look at the source: {{ Source("modules/libpref/public/Preferences.h") }}.

Revision Source

<p>{{ gecko_minversion_header("6.0") }}</p>
<p>{{ draft() }}</p>
<p>Firefox 6 introduced static functions, as part of the C++ <code>Preferences</code> class, for accessing preferences efficiently from within application code. This API is not available for add-ons, but if you're working on a Gecko application, this API is the preferred way to access preferences.</p>
<p>Due to the relatively limited target audience for this API, we don't have a thorough API reference at this time (although if you have some time, feel free to add one!). The examples below and the self-explanatory nature of most of the API should do the trick. Take a look at the source: {{ Source("modules/libpref/public/Preferences.h") }}.</p>
Revert to this revision