Reference
Arcane.preferences.get()
Reads one preference. A missing key resolves with found:false,value:null. Requires preferences.read.
This focused page is derived from the mechanically checked full member inventory.
Syntax
Arcane.preferences.get(key)
Parameters
key: 1–128-character preference key
Return value
Promise<{key, found:boolean, value}>
Description
Reads one preference. A missing key resolves with found:false,value:null. Requires preferences.read.
Overview
Reads one app-scoped preference. Use it for a user choice that the same application should restore later; use shared Arcane services for system-wide policy rather than copying a platform setting into app preferences.
Result
Requires preferences.read. The key uses the same 1–128 character contract as
storage keys. The promise resolves to {key,found,value} and returns
found:false,value:null for an absent preference.
Errors and recovery
Invalid names reject with INVALID_STORAGE_KEY because preferences share the
storage-key validator. A permission or host failure is not an absent preference:
keep the setting unresolved or retain its current in-memory value instead of
silently overwriting it with a default.
Example
async function preferredDensity() {
const result = await Arcane.preferences.get('layout.density');
return result.found ? result.value : 'comfortable';
}
document.documentElement.dataset.density = await preferredDensity();