Labs/JS Modules: Difference between revisions

document the resetBranch method
(document the observe/ignore API of the Preferences module)
(document the resetBranch method)
Line 210: Line 210:
  let hasFoo = Preferences.has("extensions.test.foo");
  let hasFoo = Preferences.has("extensions.test.foo");
  // hasFoo == true, if the pref has a default value
  // hasFoo == true, if the pref has a default value
To reset an entire branch of preferences, call <code>resetBranch</code>:
Preferences.resetBranch("extensions.test.");
// Any pref starting with "extensions.test." is now reset.


=== Locking and Unlocking ===
=== Locking and Unlocking ===
canmove, Confirmed users
2,056

edits