mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/HTML: Pubically expose entangled port and post message steps
These are needed for the implementation of Transferable streams.
This commit is contained in:
@@ -36,6 +36,9 @@ public:
|
||||
|
||||
void disentangle();
|
||||
|
||||
GC::Ptr<MessagePort> entangled_port() { return m_remote_port; }
|
||||
GC::Ptr<MessagePort const> entangled_port() const { return m_remote_port; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/web-messaging.html#dom-messageport-postmessage
|
||||
WebIDL::ExceptionOr<void> post_message(JS::Value message, Vector<GC::Root<JS::Object>> const& transfer);
|
||||
|
||||
@@ -59,6 +62,8 @@ public:
|
||||
|
||||
void set_worker_event_target(GC::Ref<DOM::EventTarget>);
|
||||
|
||||
WebIDL::ExceptionOr<void> message_port_post_message_steps(GC::Ptr<MessagePort> target_port, JS::Value message, StructuredSerializeOptions const& options);
|
||||
|
||||
private:
|
||||
explicit MessagePort(JS::Realm&);
|
||||
|
||||
@@ -68,7 +73,6 @@ private:
|
||||
|
||||
bool is_entangled() const;
|
||||
|
||||
WebIDL::ExceptionOr<void> message_port_post_message_steps(GC::Ptr<MessagePort> target_port, JS::Value message, StructuredSerializeOptions const& options);
|
||||
void post_message_task_steps(SerializedTransferRecord&);
|
||||
void post_port_message(SerializedTransferRecord);
|
||||
ErrorOr<void> send_message_on_transport(SerializedTransferRecord const&);
|
||||
|
||||
Reference in New Issue
Block a user