mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
LibWeb: Add activeElement attribute in ShadowRoot
This commit is contained in:
parent
0989c3cdaf
commit
66d18170c6
Notes:
github-actions[bot]
2025-09-10 15:53:47 +00:00
Author: https://github.com/F3n67u
Commit: 66d18170c6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6131
Reviewed-by: https://github.com/tcl3 ✅
8 changed files with 166 additions and 36 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <LibWeb/Bindings/ShadowRootPrototype.h>
|
||||
#include <LibWeb/DOM/AdoptedStyleSheets.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/DocumentOrShadowRoot.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
#include <LibWeb/HTML/HTMLTemplateElement.h>
|
||||
|
@ -119,6 +120,11 @@ WebIDL::ExceptionOr<void> ShadowRoot::set_html_unsafe(StringView html)
|
|||
return {};
|
||||
}
|
||||
|
||||
GC::Ptr<Element> ShadowRoot::active_element()
|
||||
{
|
||||
return calculate_active_element(*this);
|
||||
}
|
||||
|
||||
CSS::StyleSheetList& ShadowRoot::style_sheets()
|
||||
{
|
||||
if (!m_style_sheets)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue