method getValueForKeyWithDefault

value getValueForKeyWithDefault(string key,value defaultValue);

Argumente

Zurückgegebener Wert

This method returns a value for a key from the key-value store. If the key does not exist, the defaultValue argument will be returned.
The following example will get the value for a key.
var factory = shell.serviceManager.localStorage.factory;
if (factory)
{
    var keyValueStore = factory.createKeyDatabaseForIdentity("johndoe", "aol.mail");
    if (keyValueStore)
    {
        var ignore = keyValueStore.getValueForKeyWithDefault("spelling.ignoreHtml", false);
    }
}