Use the storage API rather than localStorage everywhere.
localStorage isn't reliably present, and gives security warnings when accessed while cookies are disabled. It'd be better to use storage instead.
See https://github.com/EFForg/https-everywhere/issues/11948
@Hainish are the referenced issues duplicates of this? This issue seems quite important to me for webextensions.
@J0WI #12939 is.
@Hainish I'm editing the issue to make it non-ruleset specific, we should deprecate localStorage everywhere.
I still don't see the type of issue in your description. Can you edit your issue to add this (perhaps referring to the issue template?)
@cowlicks I could try doing that, but please review my PR without delays.
@J0WI I don't think this fix is strictly required for the move to full WebExtensions. However I've opened #13356 as a fix, which migrates all settings from localStorage.