WebAPI/SettingsAPI: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Status ==
== Status ==


The proposed specification doesn't have a fully working implementation yet. Patches will appear in {{bug|678695}}.
This was implemented for B2G in {{bug|678695}}.


== Proposed API ==
== Proposed API ==
Line 13: Line 13:
   SettingsLock getLock();
   SettingsLock getLock();
   
   
   attribute Function? onsettingchange;
   void addObserver(DOMString name, Function observer);
  }
  }
   
   
Line 24: Line 24:
   DOMRequest get(DOMString name);
   DOMRequest get(DOMString name);
   
   
  // XXX not implemented
   // result contains JSON object with name/value pairs.
   // result contains JSON object with name/value pairs.
   DOMRequest get(DOMString[] names);
   DOMRequest get(DOMString[] names);
Line 59: Line 60:
* But some platforms might not know some settings. Do we want to add a method that checks if the platform knows a specific setting?
* But some platforms might not know some settings. Do we want to add a method that checks if the platform knows a specific setting?
* get('*') returns all settings.
* get('*') returns all settings.
[[Category:Web APIs]]
Confirmed users
1,340

edits

Navigation menu