mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Implement MediaQueryList.onchange
This commit is contained in:
parent
61e9e80232
commit
46686f7f94
Notes:
sideshowbarker
2024-07-18 03:15:59 +09:00
Author: https://github.com/Lubrsi
Commit: 46686f7f94
Pull-request: https://github.com/SerenityOS/serenity/pull/10288
Reviewed-by: https://github.com/linusg ✅
3 changed files with 15 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/EventDispatcher.h>
|
||||
#include <LibWeb/DOM/EventListener.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -65,4 +66,14 @@ void MediaQueryList::remove_listener(RefPtr<DOM::EventListener> listener)
|
|||
remove_event_listener(HTML::EventNames::change, listener);
|
||||
}
|
||||
|
||||
void MediaQueryList::set_onchange(HTML::EventHandler event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::change, event_handler);
|
||||
}
|
||||
|
||||
HTML::EventHandler MediaQueryList::onchange()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::change);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue