mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Implement BroadcastChannel.postMessage
The repository being in static storage is a bit of a hodgepodge, but in line with how our current storage partitioning is done. We should eventually move this, along with other across browsing context APIs to a proper location at a later stage. But for now, this makes progress on the meat of the BroadcastChannel API.
This commit is contained in:
parent
8f6fe1de83
commit
e565e3c557
Notes:
github-actions[bot]
2024-11-23 15:44:45 +00:00
Author: https://github.com/shannonbooth
Commit: e565e3c557
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2518
9 changed files with 422 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -24,6 +25,8 @@ public:
|
|||
return m_channel_name;
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> post_message(JS::Value message);
|
||||
|
||||
void close();
|
||||
|
||||
void set_onmessage(GC::Ptr<WebIDL::CallbackType>);
|
||||
|
@ -36,6 +39,8 @@ private:
|
|||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
bool is_eligible_for_messaging() const;
|
||||
|
||||
FlyString m_channel_name;
|
||||
bool m_closed_flag { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue