mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
The popoverTargetElement seems to be one of the only cases of a reflected Element? attribute in the HTML spec, the behaviour of which is specified in section 2.6.1. Buttons can't actually toggle popovers yet because showing/hiding popovers is not implemented yet.
34 lines
692 B
C++
34 lines
692 B
C++
/*
|
|
* Copyright (c) 2024, Nathan van der Kamp <nbvdkamp@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibGC/Ptr.h>
|
|
#include <LibJS/Heap/Cell.h>
|
|
#include <LibWeb/Forward.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
class PopoverInvokerElement {
|
|
|
|
public:
|
|
PopoverInvokerElement() { }
|
|
|
|
GC::Ptr<DOM::Element> get_popover_target_element() { return m_popover_target_element; }
|
|
|
|
void set_popover_target_element(GC::Ptr<DOM::Element> value) { m_popover_target_element = value; }
|
|
|
|
protected:
|
|
void visit_edges(JS::Cell::Visitor& visitor)
|
|
{
|
|
visitor.visit(m_popover_target_element);
|
|
}
|
|
|
|
private:
|
|
GC::Ptr<DOM::Element> m_popover_target_element;
|
|
};
|
|
|
|
}
|