function loadPrefs(prefs) {
	for (var id in prefs) {
		var value = this.prefs.getPref(id, prefs[id]);
		var el = document.getElementById(id);
		if (isCheckbox(el)) {
			el.checked = value;
		} else {
			el.value = value;
		}
		el.dispatchEvent(new Event("change", {bubbles: true, cancelable: true}));
		el.addEventListener("change", changePref);
	}
}
// Accepts a hash of pref name to default value
Accepts a hash of pref name to default value
Accepts a hash of pref name to default value
function loadPrefs(prefs) {
	for (var id in prefs) {
		var value = this.prefs.getPref(id, prefs[id]);
		var el = document.getElementById(id);
		if (isCheckbox(el)) {
			el.checked = value;
		} else {
			el.value = value;
		}
		el.dispatchEvent(new Event("change", {bubbles: true, cancelable: true}));
		el.addEventListener("change", changePref);
	}
}
function loadPrefs ( prefs ) { for ( var id in prefs ) { var value = this . prefs . getPref ( id , prefs [ id ] ) ; var el = document . getElementById ( id ) ; if ( isCheckbox ( el ) ) { el . checked = value ; } else { el . value = value ; } el . dispatchEvent ( new Event ( "change" , { bubbles : true , cancelable : true } ) ) ; el . addEventListener ( "change" , changePref ) ; } }
Accepts a hash of pref name to default value
Accepts a hash of pref name to default value