Confirmed users
53
edits
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( | Promise get(DataStoreKey... id); | ||
// Promise<void> | // Promise<void> | ||
Promise put(any obj, | Promise put(any obj, DataStoreKey id); | ||
// Promise< | // Promise<DataStoreKey> | ||
Promise add(any obj, optional | Promise add(any obj, optional DataStoreKey id); | ||
// Promise<boolean> | // Promise<boolean> | ||
Promise remove( | Promise remove(DataStoreKey id); | ||
// Promise<void> | // Promise<void> | ||
Line 125: | Line 124: | ||
DataStoreOperation operation; | DataStoreOperation operation; | ||
DataStoreKey id; | |||
any data; | any data; | ||
}; | }; | ||
Line 131: | Line 130: | ||
dictionary DataStoreChangeEventInit : EventInit { | dictionary DataStoreChangeEventInit : EventInit { | ||
DOMString revisionId = ""; | DOMString revisionId = ""; | ||
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 | readonly attribute DataStoreKey id; | ||
readonly attribute DOMString operation; | readonly attribute DOMString operation; | ||
}; | }; |