VulpesOS/gaia/tests/jsmarionette/plugins/marionette-settings-api/lib/scripts/setsetting.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

16 lines
464 B
JavaScript
Executable file

(function(name, value) {
'use strict';
var setting = {};
setting[name] = value;
var req = window.navigator.mozSettings.createLock().set(setting);
req.onsuccess = function() {
console.log('setting ' + name + 'changed');
marionetteScriptFinished({ value: true });
};
req.onerror = function() {
console.log('error changing setting', req.error.name);
marionetteScriptFinished({ error: req.error.name });
};
}.apply(this, arguments));