LibWeb: SVGElement includes GlobalEventHandlers

This fixes many tests on
wpt/html/webappapis/scripting/events/event-handler-all-global-events.html
This commit is contained in:
Jamie Mansfield 2024-07-09 20:20:05 +01:00 committed by Andreas Kling
parent ffb3a28684
commit 59f74b909b
Notes: sideshowbarker 2024-07-17 04:03:27 +09:00
2 changed files with 7 additions and 1 deletions

View File

@ -11,7 +11,9 @@
namespace Web::SVG {
class SVGElement : public DOM::Element {
class SVGElement
: public DOM::Element
, public HTML::GlobalEventHandlers {
WEB_PLATFORM_OBJECT(SVGElement, DOM::Element);
public:
@ -42,6 +44,9 @@ protected:
JS::NonnullGCPtr<SVGAnimatedLength> svg_animated_length_for_property(CSS::PropertyID) const;
private:
// ^HTML::GlobalEventHandlers
virtual JS::GCPtr<DOM::EventTarget> global_event_handlers_to_event_target(FlyString const&) override { return *this; }
virtual bool is_svg_element() const final { return true; }
};

View File

@ -8,5 +8,6 @@
interface SVGElement : Element {
};
SVGElement includes GlobalEventHandlers;
SVGElement includes HTMLOrSVGElement;
SVGElement includes ElementCSSInlineStyle;