Confirmed users
53
edits
Line 66: | Line 66: | ||
// Returns the label of the DataSource. | // Returns the label of the DataSource. | ||
readonly attribute DOMString name; | readonly attribute DOMString name; | ||
// Returns the origin of the DataSource (e.g., 'facebook.com'). | // Returns the origin of the DataSource (e.g., 'facebook.com'). | ||
// This value is the manifest URL of the owner app. | // This value is the manifest URL of the owner app. | ||
Line 73: | Line 73: | ||
// is readOnly a F(current_app, datastore) function? yes | // is readOnly a F(current_app, datastore) function? yes | ||
readonly attribute boolean readOnly; | readonly attribute boolean readOnly; | ||
Promise< | // Promise<any> | ||
Promise<void> | Promise get(unsigned long id); | ||
Promise< | |||
Promise<boolean> remove( | // Promise<any> | ||
Promise<void> | Promise get(sequence<unsigned long> id); | ||
// Promise<void> | |||
Promise update(unsigned long id, any obj); | |||
// Promise<unsigned long> | |||
Promise add(any obj); | |||
// Promise<boolean> | |||
Promise remove(unsigned long id); | |||
// Promise<void> | |||
Promise clear(); | |||
readonly attribute DOMString revisionId; | readonly attribute DOMString revisionId; | ||
attribute EventHandler onchange; | attribute EventHandler onchange; | ||
Promise<DataStoreChanges> getChanges(DOMString revisionId); | |||
// Promise<DataStoreChanges> | |||
// | Promise getChanges(DOMString revisionId); | ||
// Promise<unsigned long> | |||
Promise getLength(); | |||
}; | |||
dictionary DataStoreChanges { | |||
DOMString revisionId; | |||
sequence<unsigned long> addedIds; | |||
sequence<unsigned long> updatedIds; | |||
sequence<unsigned long> removedIds; | |||
}; | |||
dictionary DataStoreChangeEventInit : EventInit { | |||
DOMString revisionId = ""; | |||
unsigned long id = 0; | |||
DOMString operation = ""; | |||
}; | }; | ||
interface | [Constructor(DOMString type, optional DataStoreChangeEventInit eventInitDict)] | ||
interface DataStoreChangeEvent : Event { | |||
readonly attribute DOMString revisionId; | readonly attribute DOMString revisionId; | ||
readonly attribute | readonly attribute unsigned long id; | ||
readonly attribute | readonly attribute DOMString operation; | ||
}; | }; | ||