mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibWeb: Add ports attribute to MessageEvent and MessageEventInit
Still some FIXMEs left though, as the IDL generator doesn't know what a FrozenArray is, nor how to properly create a sequence of a Platform Object.
This commit is contained in:
parent
e464d484c4
commit
73697058b0
Notes:
sideshowbarker
2024-07-17 14:36:19 +09:00
Author: https://github.com/ADKaster
Commit: 73697058b0
Pull-request: https://github.com/SerenityOS/serenity/pull/22269
Reviewed-by: https://github.com/Lubrsi
3 changed files with 21 additions and 0 deletions
|
@ -20,6 +20,7 @@ struct MessageEventInit : public DOM::EventInit {
|
|||
String origin {};
|
||||
String last_event_id {};
|
||||
Optional<MessageEventSource> source;
|
||||
Vector<JS::Handle<JS::Object>> ports;
|
||||
};
|
||||
|
||||
class MessageEvent : public DOM::Event {
|
||||
|
@ -36,6 +37,7 @@ public:
|
|||
JS::Value data() const { return m_data; }
|
||||
String const& origin() const { return m_origin; }
|
||||
String const& last_event_id() const { return m_last_event_id; }
|
||||
JS::NonnullGCPtr<JS::Object> ports() const;
|
||||
Variant<JS::Handle<WindowProxy>, JS::Handle<MessagePort>, Empty> source() const;
|
||||
|
||||
private:
|
||||
|
@ -46,6 +48,8 @@ private:
|
|||
String m_origin;
|
||||
String m_last_event_id;
|
||||
Optional<MessageEventSource> m_source;
|
||||
Vector<JS::Handle<JS::Object>> m_ports;
|
||||
mutable JS::GCPtr<JS::Array> m_ports_array;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue