Re: Check if preferences (pref.js) exists
Christian Biesinger <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpcom |
|---|---|
| Message-ID | <[email protected]> |
Markus Hossner wrote:
> But can perhaps anybody tell me: How can I check if the preferences
> exists, before, I try to get its content.
var prefExists = false;
try {
var type = pref.GetPrefType("pref_name");
prefExists = true;
}
catch (ex) {}
(untested)
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
-- Benjamin Franklin