mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
LibWeb: Give Element a CustomStateSet, exposed by ElementInternals
This commit is contained in:
parent
e63d81b36e
commit
b6ffea8990
Notes:
github-actions[bot]
2025-07-04 17:11:47 +00:00
Author: https://github.com/AtkinsSJ
Commit: b6ffea8990
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5302
Reviewed-by: https://github.com/tcl3 ✅
10 changed files with 209 additions and 1 deletions
|
@ -208,6 +208,13 @@ WebIDL::ExceptionOr<GC::Ptr<DOM::NodeList>> ElementInternals::labels()
|
|||
return WebIDL::NotSupportedError::create(realm(), "FIXME: ElementInternals::labels()"_string);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/custom-elements.html#dom-elementinternals-states
|
||||
GC::Ptr<CustomStateSet> ElementInternals::states()
|
||||
{
|
||||
// The states getter steps are to return this's target element's states set.
|
||||
return m_target_element->ensure_custom_state_set();
|
||||
}
|
||||
|
||||
void ElementInternals::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ElementInternals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue