mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Implement Worker.postMessage(message, transfer)
This commit is contained in:
committed by
Andreas Kling
parent
755b63132b
commit
bf81e2fd64
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user