Preferences bindings

From MozillaZine Knowledge Base
Revision as of 03:01, 9 July 2005 by Asqueella (talk | contribs) (→‎New elements: moving to devmo)
Jump to navigationJump to search
Work in progress See also this forum thread.

This document describes the new XBL bindings introduced in Deer Park Alpha 1 (aka Firefox 1.1a and Firefox 1.1 Developer Preview Release) and other Toolkit 1.1 applications, which allow you write Options (Preferences) UI faster, using less JavaScript code.

This is not official yet. May be incomplete, contain any kinds of mistakes and typos etc. Please, if you see one, either fix it or note it on the talk page.

To-do

Todo:

  • sort alphabetically
  • review the doc, do something about things marked '??'.
  • describe platform specific features:
    • instant apply
    • animation
  • (maybe) simple example(s)

Why

Describe the benefits of the new system:

  • Use of declarative language (XUL elements/attributes) to associate UI controls with user preferences, less JS is needed
  • More natural feel on Linux/Mac OS: instantapply/animation
  • ...


New attributes

The following attributes may be put on any element in the prefwindow:

  • onsyncfrompreference/onsynctopreference (onpreferenceread/onpreferencewrite in Deer Park Alpha 1) [1]
  • preference-editable
  • preference

Example(s)

See the forum thread for now.