mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00: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:
parent
acd5382924
commit
80fad65e5b
2 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue