mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Implement the ToggleEvent.source attribute
See: https://github.com/whatwg/html/pull/11186
This commit is contained in:
Notes:
github-actions[bot]
2025-06-07 03:07:15 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/fc35229dabc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5002 Reviewed-by: https://github.com/tcl3 ✅ Reviewed-by: https://github.com/trflynn89
@@ -26,7 +26,9 @@ public:
|
||||
String return_value() const;
|
||||
void set_return_value(String);
|
||||
|
||||
static WebIDL::ExceptionOr<void> show_a_modal_dialog(HTMLDialogElement&);
|
||||
static WebIDL::ExceptionOr<void> show_a_modal_dialog(HTMLDialogElement&, GC::Ptr<DOM::Element> source);
|
||||
|
||||
void close_the_dialog(Optional<String> result, GC::Ptr<DOM::Element> source);
|
||||
|
||||
WebIDL::ExceptionOr<void> show();
|
||||
WebIDL::ExceptionOr<void> show_modal();
|
||||
@@ -50,9 +52,7 @@ private:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void queue_a_dialog_toggle_event_task(String old_state, String new_state);
|
||||
|
||||
void close_the_dialog(Optional<String> result);
|
||||
void queue_a_dialog_toggle_event_task(String old_state, String new_state, GC::Ptr<DOM::Element> source);
|
||||
|
||||
void run_dialog_focusing_steps();
|
||||
|
||||
@@ -63,6 +63,7 @@ private:
|
||||
String m_return_value;
|
||||
bool m_is_modal { false };
|
||||
Optional<String> m_request_close_return_value;
|
||||
GC::Ptr<DOM::Element> m_request_close_source_element;
|
||||
GC::Ptr<CloseWatcher> m_close_watcher;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interactive-elements.html#dialog-toggle-task-tracker
|
||||
|
||||
Reference in New Issue
Block a user