mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-24 03:25:02 +00:00
LibWeb: Implement IDBRequest.onerror
(cherry picked from commit 68d84755f4b745351d3d494759d59ba6719b8ad8)
This commit is contained in:
parent
6d268be6fc
commit
ef7d593463
|
@ -39,4 +39,16 @@ WebIDL::CallbackType* IDBRequest::onsuccess()
|
||||||
return event_handler_attribute(HTML::EventNames::success);
|
return event_handler_attribute(HTML::EventNames::success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://w3c.github.io/IndexedDB/#dom-idbrequest-onerror
|
||||||
|
void IDBRequest::set_onerror(WebIDL::CallbackType* event_handler)
|
||||||
|
{
|
||||||
|
set_event_handler_attribute(HTML::EventNames::error, event_handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://w3c.github.io/IndexedDB/#dom-idbrequest-onerror
|
||||||
|
WebIDL::CallbackType* IDBRequest::onerror()
|
||||||
|
{
|
||||||
|
return event_handler_attribute(HTML::EventNames::error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ public:
|
||||||
|
|
||||||
void set_onsuccess(WebIDL::CallbackType*);
|
void set_onsuccess(WebIDL::CallbackType*);
|
||||||
WebIDL::CallbackType* onsuccess();
|
WebIDL::CallbackType* onsuccess();
|
||||||
|
void set_onerror(WebIDL::CallbackType*);
|
||||||
|
WebIDL::CallbackType* onerror();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit IDBRequest(JS::Realm&);
|
explicit IDBRequest(JS::Realm&);
|
||||||
|
|
|
@ -11,7 +11,7 @@ interface IDBRequest : EventTarget {
|
||||||
|
|
||||||
// Event handlers:
|
// Event handlers:
|
||||||
attribute EventHandler onsuccess;
|
attribute EventHandler onsuccess;
|
||||||
[FIXME] attribute EventHandler onerror;
|
attribute EventHandler onerror;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum IDBRequestReadyState {
|
enum IDBRequestReadyState {
|
||||||
|
|
Loading…
Reference in a new issue