LibWeb: Implement stub for ElementInternals

This implements a stub ElementInternals object which implements the
shadowRoot getter only.

Also implement attachInternals function.
This commit is contained in:
Luke Warlow 2024-06-24 21:54:42 +01:00 committed by Andreas Kling
commit a65f1ecc37
Notes: sideshowbarker 2024-07-17 18:49:10 +09:00
13 changed files with 193 additions and 1 deletions

View file

@ -75,6 +75,8 @@ public:
String get_an_elements_target() const;
TokenizedFeature::NoOpener get_an_elements_noopener(StringView target) const;
WebIDL::ExceptionOr<JS::NonnullGCPtr<ElementInternals>> attach_internals();
protected:
HTMLElement(DOM::Document&, DOM::QualifiedName);
@ -97,6 +99,9 @@ private:
JS::GCPtr<DOM::NodeList> m_labels;
// https://html.spec.whatwg.org/multipage/custom-elements.html#attached-internals
JS::GCPtr<ElementInternals> m_attached_internals;
enum class ContentEditableState {
True,
False,