mozillathunderbirdthunderbird-webextensions

How to use and access the preference in thunderbird , in Webextension environment ,not in the legacy


Currently using this method as a legacy method.

this.prefService = Components
       .classes["@mozilla.org/preferences-service;1"]
       .getService(Components.interfaces.nsIPrefService);

 this.prefBranch = this.prefService.getBranch(root);

but i did not get a complete idea about how to use this in the webextension environment thunderbird .any api in order to use this feature ?


Solution

  • I solved my issue, by using Web Extension experiment.

    Implemented the same legacy extension function with the Web Extension Experiment Specification and that solved my need at this moment. the link mentioned below.

    https://thunderbird-webextensions.readthedocs.io/en/68/how-to/experiments.html

    https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/functions.html