mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 00:42:54 +00:00
LibWeb: Implement Worker.postMessage(message, transfer)
This commit is contained in:
parent
755b63132b
commit
bf81e2fd64
Notes:
github-actions[bot]
2024-10-28 22:33:09 +00:00
Author: https://github.com/shannonbooth
Commit: bf81e2fd64
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2022
3 changed files with 12 additions and 2 deletions
|
@ -132,6 +132,16 @@ WebIDL::ExceptionOr<void> Worker::post_message(JS::Value message, StructuredSeri
|
|||
return m_outside_port->post_message(message, options);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-worker-postmessage
|
||||
WebIDL::ExceptionOr<void> Worker::post_message(JS::Value message, Vector<JS::Handle<JS::Object>> const& transfer)
|
||||
{
|
||||
// The postMessage(message, transfer) and postMessage(message, options) methods on Worker objects act as if,
|
||||
// when invoked, they immediately invoked the respective postMessage(message, transfer) and
|
||||
// postMessage(message, options) on the port, with the same arguments, and returned the same return value.
|
||||
|
||||
return m_outside_port->post_message(message, transfer);
|
||||
}
|
||||
|
||||
#undef __ENUMERATE
|
||||
#define __ENUMERATE(attribute_name, event_name) \
|
||||
void Worker::set_##attribute_name(WebIDL::CallbackType* value) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue