Closed
Bug 1231081
Opened 9 years ago
Closed 7 years ago
IDBRequest.onsuccess and onerror docs missing event explanation
Categories
(Developer Documentation Graveyard :: API: IndexedDB, defect)
Developer Documentation Graveyard
API: IndexedDB
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: robincafolla, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 Build ID: 20151030084315 Steps to reproduce: Docs on IDBRequest.onsuccess and IDBRequest.onerror are missing information on the parameter passed to the callback. e.g: request.onsuccess = function() { ... }; should read request.onsuccess = function( event ) { ... }; where the event interface is documented. It may not even be an event. (although my jpm console seems to think it is) Actual results: No docs for the event object. Expected results: There should at least be an interface for that event. Things it would be nice to know: - What is it? (interface) - Is it standardised across browsers? - What can it be used for?
Reporter | ||
Comment 1•9 years ago
|
||
This may actually be a spec issue: http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest I see in the spec IDBRequest.onsuccess is defined as an EventHandler, but it doesn't state any particular Event that is passed to it, and the examples in the spec don't list the Event. Does that mean the parameter is a generic event with no specific data for the request?
Comment 2•9 years ago
|
||
Spec says it is a "success" event: http://www.w3.org/TR/IndexedDB/#widl-IDBRequest-onsuccess http://www.w3.org/TR/IndexedDB/#dfn-fire-a-success-event says: "The event must use the Event interface and have its type set to "success". The event does not bubble and is not cancelable." The interface is Event, with type="success", bubble=no and cancelable=no. The parameter is indeed missing in the article example. And success in the description should be a link to https://developer.mozilla.org/en-US/docs/Web/Events/success (Similar for onerror).
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 3•9 years ago
|
||
I don't mind editing the docs to reflect that. Is there a style guide for how event information should be included?
Reporter | ||
Comment 4•9 years ago
|
||
Added brief information and links to: - https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onsuccess - https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onerror More or less resolved.
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•