235
edits
m (→2. Panels) |
(<preferences> need to be last child) |
||
Line 87: | Line 87: | ||
<overlay> | <overlay> | ||
<prefpane> | <prefpane> | ||
... | |||
<checkbox id="homeButton" | |||
label="&homeButton.label;" | |||
accesskey="&homeButton.accesskey;" | |||
preference="browser.toolbars.showbutton.home"/> | |||
... | |||
<preferences id="navigator_preferences"> | <preferences id="navigator_preferences"> | ||
<preference id="browser.toolbars.showbutton.home" | <preference id="browser.toolbars.showbutton.home" | ||
Line 93: | Line 99: | ||
... | ... | ||
</preferences> | </preferences> | ||
The <preferences> element must be a direct child of the <prefpane>, with the <preference>s as its children. Each <preference> needs the attributes ''name'' (with the name of the preference in ''prefs.js'' etc.) and ''type'' with its type, see [http://developer.mozilla.org/en/docs/Preferences_System:preference DevMo for details]. Since preference names are unique by default, the ''id'' attribute should be set to the pref name as well. | The <preferences> element must be a direct child of the <prefpane>, with the <preference>s as its children. (Usually, it should be the '''last''' child of the <prefpane>, so that the <preference>'s constructor can init any elements watching this pref.) Each <preference> needs the attributes ''name'' (with the name of the preference in ''prefs.js'' etc.) and ''type'' with its type, see [http://developer.mozilla.org/en/docs/Preferences_System:preference DevMo for details]. Since preference names are unique by default, the ''id'' attribute should be set to the pref name as well. | ||
The former ''prefstring'' attribute on an element must be replaced by a ''preference'' attribute, which contains the ''id'' of the respective <preference>. | The former ''prefstring'' attribute on an element must be replaced by a ''preference'' attribute, which contains the ''id'' of the respective <preference>. |
edits