Closed
Bug 1415798
Opened 7 years ago
Closed 6 years ago
Tutorials of "Implement a settings page" should use synced storage
Categories
(Developer Documentation Graveyard :: Add-ons, enhancement, P1)
Developer Documentation Graveyard
Add-ons
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.)
Updated•7 years ago
|
Priority: -- → P2
Updated•6 years ago
|
Assignee: nobody → ismith
Priority: P2 → P1
Comment 1•6 years ago
|
||
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)
Comment 2•6 years ago
|
||
(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.
Assignee | ||
Comment 4•6 years ago
|
||
I'm marking this as resolved.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•