mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
LibWeb: Only make certain <body> and <frameset> events apply to Window
Previously we forwarded all event handler attributes to Window from these two elements, however, we are only supposed to forward blur, error, focus, load, resize and scroll.
This commit is contained in:
parent
a50a48f6b4
commit
ebf2184636
11 changed files with 37 additions and 16 deletions
|
@ -353,7 +353,7 @@ private:
|
|||
explicit Document(const AK::URL&);
|
||||
|
||||
// ^HTML::GlobalEventHandlers
|
||||
virtual EventTarget& global_event_handlers_to_event_target() final { return *this; }
|
||||
virtual EventTarget& global_event_handlers_to_event_target(FlyString const&) final { return *this; }
|
||||
|
||||
void tear_down_layout_tree();
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ ExceptionOr<bool> EventTarget::dispatch_event_binding(NonnullRefPtr<Event> event
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#window-reflecting-body-element-event-handler-set
|
||||
static bool is_window_reflecting_body_element_event_handler(FlyString const& name)
|
||||
bool is_window_reflecting_body_element_event_handler(FlyString const& name)
|
||||
{
|
||||
return name.is_one_of(
|
||||
HTML::EventNames::blur,
|
||||
|
|
|
@ -86,4 +86,6 @@ private:
|
|||
JS::ThrowCompletionOr<void> process_event_handler_for_event(FlyString const& name, Event& event);
|
||||
};
|
||||
|
||||
bool is_window_reflecting_body_element_event_handler(FlyString const& name);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue