[Project_owners] Saving Data

Didier Ernotte didier at ernotte.com
Fri Dec 15 06:06:21 PST 2006


        var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("your_extension_name.");
        prefs.setCharPref("your.sub.path.to.pref", "foo");
        var str = prefs.getCharPref("your.sub.path.to.pref");

you can store and retrieve value from session to session.


Amin <amin.eft at gmail.com> wrote: is there any easy method to save a string in my extension so i can show it or use it next time that user open browser ?
Project_owners mailing list
Project_owners at mozdev.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20061215/8515f42c/attachment.html 

More information about the Project_owners mailing list