mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb: Implement ServiceWorkerContainer.onmessageerror
This commit is contained in:
parent
4b1273cbde
commit
f1098b4226
Notes:
github-actions[bot]
2024-08-28 17:37:23 +00:00
Author: https://github.com/jamierocks
Commit: f1098b4226
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1196
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 15 additions and 1 deletions
|
@ -43,4 +43,16 @@ void ServiceWorkerContainer::set_onmessage(WebIDL::CallbackType* event_handler)
|
||||||
set_event_handler_attribute(HTML::EventNames::message, event_handler);
|
set_event_handler_attribute(HTML::EventNames::message, event_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://w3c.github.io/ServiceWorker/#dom-serviceworkercontainer-onmessageerror
|
||||||
|
WebIDL::CallbackType* ServiceWorkerContainer::onmessageerror()
|
||||||
|
{
|
||||||
|
return event_handler_attribute(HTML::EventNames::messageerror);
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://w3c.github.io/ServiceWorker/#dom-serviceworkercontainer-onmessageerror
|
||||||
|
void ServiceWorkerContainer::set_onmessageerror(WebIDL::CallbackType* event_handler)
|
||||||
|
{
|
||||||
|
set_event_handler_attribute(HTML::EventNames::messageerror, event_handler);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ public:
|
||||||
|
|
||||||
WebIDL::CallbackType* onmessage();
|
WebIDL::CallbackType* onmessage();
|
||||||
void set_onmessage(WebIDL::CallbackType*);
|
void set_onmessage(WebIDL::CallbackType*);
|
||||||
|
WebIDL::CallbackType* onmessageerror();
|
||||||
|
void set_onmessageerror(WebIDL::CallbackType*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit ServiceWorkerContainer(JS::Realm&);
|
explicit ServiceWorkerContainer(JS::Realm&);
|
||||||
|
|
|
@ -19,7 +19,7 @@ interface ServiceWorkerContainer : EventTarget {
|
||||||
// events
|
// events
|
||||||
[FIXME] attribute EventHandler oncontrollerchange;
|
[FIXME] attribute EventHandler oncontrollerchange;
|
||||||
attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
||||||
[FIXME] attribute EventHandler onmessageerror;
|
attribute EventHandler onmessageerror;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary RegistrationOptions {
|
dictionary RegistrationOptions {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue