method removeKeysWithPrefix

void removeKeysWithPrefix(string keyPrefix);

Argumente

Zurückgegebener Wert

This method removes keys and their values from a key-value store.

The following example will remove all spelling keys.
var factory = shell.serviceManager.localStorage.factory;
if (factory)
{
    var keyValueStore = factory.createKeyDatabaseForIdentity("johndoe", "aol.mail");
    if (keyValueStore)
    {
        keyValueStore.removeKeysWithPrefix("spelling");
    }
}