pref (key, val, mayBeEmpty) {
    if (mayBeEmpty || val) {
      this.curPrefs[key] = val
      return undefined
    }
    return (key in this.curPrefs) ? this.curPrefs[key] : this.defaultPrefs[key]
  }
Store and retrieve preferences.
@function pref
@param {string} key The preference name to be retrieved or set
@param {string} [val] The value. If the value supplied is missing or falsey, no change to the preference will
be made unless `mayBeEmpty` is set.
@param {boolean} [mayBeEmpty] If value may be falsey.
@returns {string|void} If val is missing or falsey and `mayBeEmpty` is not set, the
value of the previously stored preference will be returned.
@todo Review whether any remaining existing direct references to
 getting `curPrefs` can be changed to use `svgEditor.configObj.pref()` getting to ensure
 `defaultPrefs` fallback (also for sake of `allowInitialUserOverride`);
 specifically, `bkgd_color` could be changed so that the pref dialog has a
 button to auto-calculate background, but otherwise uses `svgEditor.configObj.pref()` to
 be able to get default prefs or overridable settings