PrefManager.onPrefChanged Member

Syntax

object.onPrefChanged(prefName, realValue, oldValue);

Arguments

ArgumentSummary
prefName
realValue
oldValue

Returns

Remarks

See Also

Source Code

function pm_prefchanged(prefName, realValue, oldValue)
{
var r, oldValue;
// We're only interested in prefs we actually know about.
if (!(prefName in this.prefRecords) || !(r = this.prefRecords[prefName]))
return;
if (r.realValue != null)
oldValue = r.realValue;
else if (typeof r.defaultValue == "function")
oldValue = r.defaultValue(prefName);
else
oldValue = r.defaultValue;
var realValue = this.getPref(prefName, PREF_RELOAD);
for (var i = 0; i < this.observers.length; i++)
this.observers[i].onPrefChanged(prefName, realValue, oldValue);
}