Closed Bug 1415798 Opened 8 years ago Closed 7 years ago

Tutorials of "Implement a settings page" should use synced storage

Categories

(Developer Documentation Graveyard :: Add-ons, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xidorn, Assigned: ismith)

Details

The example in "Implement a settings page" is currently using code: > function saveOptions(e) { > e.preventDefault(); > browser.storage.local.set({ > color: document.querySelector("#color").value > }); > } However, I believe developers and users generally want to sync the options of addons across different devices, so I think this example code should really use storage.sync by default, and explain that developers can also use storage.local if they think some options are better kept locally in a note after. (I'm not sure whether this matches the teams' thought, so I file a bug instead of editing the page directly.)
Priority: -- → P2
Assignee: nobody → ismith
Priority: P2 → P1
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Implement_a_settings_page$edit Updated the page so that the example uses storage.sync instead of storage.local I also added the necessary id key to the manifest Finally, modified the code description to talk about storage.syn and added a note that is possible to store settings in local storage instead.
Flags: needinfo?(xidorn+moz)
(In reply to Irene Smith (ismith) from comment #1) > https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/ > Implement_a_settings_page$edit > > Updated the page so that the example uses storage.sync instead of > storage.local > I also added the necessary id key to the manifest > > Finally, modified the code description to talk about storage.syn and added a > note that is possible to store settings in local storage instead. Wrong page link. Use: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Implement_a_settings_page instead.
Looks good to me.
Flags: needinfo?(xidorn+moz)
I'm marking this as resolved.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.