WebAPI/DataStore: Difference between revisions

Jump to navigation Jump to search
Line 63: Line 63:
== Interface ==
== Interface ==


  typedef (DOMString or unsigned long) DataStoreKey;
 
   interface DataStore : EventTarget {
   interface DataStore : EventTarget {
     // Returns the label of the DataSource.
     // Returns the label of the DataSource.
Line 75: Line 77:
    
    
     // Promise<any>
     // Promise<any>
     Promise get(unsigned long id);
     Promise get(DataStoreKey... id);
 
     
    // Promise<any>
    Promise get(sequence<unsigned long> id);
 
     // Promise<void>
     // Promise<void>
     Promise put(any obj, unsigned long id);
     Promise put(any obj, DataStoreKey id);
 
 
     // Promise<unsigned long>
     // Promise<DataStoreKey>
     Promise add(any obj, optional unsigned long id);
     Promise add(any obj, optional DataStoreKey id);
    
    
     // Promise<boolean>
     // Promise<boolean>
     Promise remove(unsigned long id);
     Promise remove(DataStoreKey id);
    
    
     // Promise<void>
     // Promise<void>
Line 125: Line 124:
    
    
     DataStoreOperation operation;
     DataStoreOperation operation;
     unsigned long id;
     DataStoreKey id;
     any data;
     any data;
   };
   };
Line 131: Line 130:
   dictionary DataStoreChangeEventInit : EventInit {
   dictionary DataStoreChangeEventInit : EventInit {
     DOMString revisionId = "";
     DOMString revisionId = "";
     unsigned long id = 0;
     DataStoreKey id = 0;
     DOMString operation = "";
     DOMString operation = "";
   };
   };
Line 138: Line 137:
   interface DataStoreChangeEvent : Event {
   interface DataStoreChangeEvent : Event {
     readonly attribute DOMString revisionId;
     readonly attribute DOMString revisionId;
     readonly attribute unsigned long id;
     readonly attribute DataStoreKey id;
     readonly attribute DOMString operation;
     readonly attribute DOMString operation;
   };
   };
Confirmed users
53

edits

Navigation menu