Make elemhide_debug volatile
At the moment whether element hiding debug mode is enabled (and which styles to use) is configured through preferences. But users of the webext-sdk
don't have access to the prefs
module.
We could provide wrappers for getting, setting, and listening to changes of these preferences. However, if we were not to use preferences in the first place to persist these information, but rather provide an API to set a volatile state with these information we could avoid a fair amount of complexity on our end while providing more flexiblity to our users (i.e. they get to decide how and whether to persist this state).
This could be implemented similar to snippets.setLibrary()
, e.g. using a global variable, set by debugging.setElementHidingDebugMode()
.
Edited by Sebastian Noack