mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
LibWeb: Implement ShadowRoot.onslotchange
This commit is contained in:
parent
da0ca2f866
commit
1b043d259a
Notes:
sideshowbarker
2024-07-17 09:56:35 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/SerenityOS/serenity/commit/1b043d259a Pull-request: https://github.com/SerenityOS/serenity/pull/24193
@ -36,6 +36,18 @@ void ShadowRoot::initialize(JS::Realm& realm)
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ShadowRoot);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-shadowroot-onslotchange
|
||||
void ShadowRoot::set_onslotchange(WebIDL::CallbackType* event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::slotchange, event_handler);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-shadowroot-onslotchange
|
||||
WebIDL::CallbackType* ShadowRoot::onslotchange()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::slotchange);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6
|
||||
EventTarget* ShadowRoot::get_parent(Event const& event)
|
||||
{
|
||||
|
@ -25,6 +25,9 @@ public:
|
||||
bool delegates_focus() const { return m_delegates_focus; }
|
||||
void set_delegates_focus(bool delegates_focus) { m_delegates_focus = delegates_focus; }
|
||||
|
||||
void set_onslotchange(WebIDL::CallbackType*);
|
||||
WebIDL::CallbackType* onslotchange();
|
||||
|
||||
bool available_to_element_internals() const { return m_available_to_element_internals; }
|
||||
void set_available_to_element_internals(bool available_to_element_internals) { m_available_to_element_internals = available_to_element_internals; }
|
||||
|
||||
|
@ -9,7 +9,7 @@ interface ShadowRoot : DocumentFragment {
|
||||
readonly attribute boolean delegatesFocus;
|
||||
readonly attribute SlotAssignmentMode slotAssignment;
|
||||
readonly attribute Element host;
|
||||
// FIXME: attribute EventHandler onslotchange;
|
||||
attribute EventHandler onslotchange;
|
||||
};
|
||||
|
||||
ShadowRoot includes InnerHTML;
|
||||
|
Loading…
Reference in New Issue
Block a user