mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 06:32:26 +02:00
LibWeb: Add function to EventTarget that says if it has any listeners
Required by XHR to determine if it should use CORS-preflight if its upload object has any event listeners.
This commit is contained in:
@@ -744,4 +744,9 @@ bool EventTarget::has_event_listener(DeprecatedFlyString const& type) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EventTarget::has_event_listeners() const
|
||||
{
|
||||
return !m_event_listener_list.is_empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user