28 void setProperty(std::string_view key, std::string
const& value)
32 void setProperty(std::string_view key, std::string_view value)
43 void setProperty(std::string_view key, std::invocable<Nui::val>
auto&& value)
48 void setProperty(std::string_view key, std::optional<T>
const& value)
59 template <
typename... List>
60 void setProperty(std::string_view key, std::variant<List...>
const& variant)
63 [
this, &key](
auto const& value) {
81 void addEventListener(std::string_view event, std::invocable<Nui::val>
auto&& callback)
84 "addEventListener",
Nui::val{std::string{
event}},
Nui::bind(callback, std::placeholders::_1));
100 void setAttribute(std::string_view key, std::invocable<Nui::val>
auto&& value)
106 if (value[0] ==
'\0')
118 template <
typename T>
124 template <
typename T>
134 template <
typename T>
142 template <
typename... List>
143 void setAttribute(std::string_view key, std::variant<List...>
const& variant)
146 [
this, &key](
auto const& value) {
Definition: basic_element.hpp:14
Nui::val element_
Definition: basic_element.hpp:72
The basic element cannot have children and does not hold explicit ownership of them.
Definition: childless_element.hpp:19
requires std::integral< T > void setProperty(std::string_view key, T value)
Definition: childless_element.hpp:70
void setProperty(std::string_view key, std::optional< T > const &value)
Definition: childless_element.hpp:48
void setProperty(std::string_view key, std::invocable< Nui::val > auto &&value)
Definition: childless_element.hpp:43
void setAttribute(std::string_view key, std::string const &value)
Definition: childless_element.hpp:88
void addEventListener(std::string_view event, std::invocable< Nui::val > auto &&callback)
Definition: childless_element.hpp:81
void setAttribute(std::string_view key, std::invocable< Nui::val > auto &&value)
Definition: childless_element.hpp:100
requires std::floating_point< T > void setAttribute(std::string_view key, T value)
Definition: childless_element.hpp:126
void setProperty(std::string_view key, bool value)
Definition: childless_element.hpp:55
ChildlessElement(HtmlElement const &elem)
Definition: childless_element.hpp:21
void setAttribute(std::string_view key, std::variant< List... > const &variant)
Definition: childless_element.hpp:143
void setAttribute(std::string_view key, std::optional< T > const &value)
Definition: childless_element.hpp:135
void setAttribute(std::string_view key, char const *value)
Definition: childless_element.hpp:104
ChildlessElement(Nui::val val)
Definition: childless_element.hpp:24
ChildlessElement()
Definition: childless_element.hpp:162
void setProperty(std::string_view key, std::variant< List... > const &variant)
Definition: childless_element.hpp:60
requires std::integral< T > void setAttribute(std::string_view key, T value)
Definition: childless_element.hpp:120
static Nui::val createElement(HtmlElement const &element)
Definition: childless_element.hpp:166
requires std::floating_point< T > void setProperty(std::string_view key, T value)
Definition: childless_element.hpp:76
void setNodeValue(std::string_view value)
Definition: childless_element.hpp:152
void setAttribute(std::string_view key, Nui::val value)
Definition: childless_element.hpp:130
void setProperty(std::string_view key, std::string_view value)
Definition: childless_element.hpp:32
void setAttribute(std::string_view key, bool value)
Definition: childless_element.hpp:111
void setProperty(std::string_view key, char const *value)
Definition: childless_element.hpp:36
void setAttribute(std::string_view key, std::string_view value)
Definition: childless_element.hpp:96
void setProperty(std::string_view key, std::string const &value)
Definition: childless_element.hpp:28
void setNodeValue(std::string const &value)
Definition: childless_element.hpp:156
Definition: html_element.hpp:60
HtmlElementBridge const * bridge() const
Definition: html_element.hpp:356
Definition: basic_element.hpp:12
emscripten::val bind(F &&f, Args &&... args)
Equivalent of std::bind returning a javascript functor.
Definition: functions.hpp:98
requires(IsObservedLike< ObservedValues > &&...) ObservedValueCombinator< std
Definition: observed_value_combinator.hpp:191
emscripten::val val
Definition: val.hpp:5
Nui::val(* createElement)(HtmlElement const &element)
Definition: html_element_bridge.hpp:15