Nui
Loading...
Searching...
No Matches
resize_observer.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <functional>
7
8namespace Nui::WebApi
9{
16 {
17 public:
18 explicit ResizeObserver(
19 std::function<void(std::vector<ResizeObserverEntry> const&, ResizeObserver const&)> callback);
20 explicit ResizeObserver(Nui::val event);
21
26 void disconnect() const;
27
32 void observe(Nui::val target) const;
33
35 {
36 std::string box;
37 };
54 void observe(Nui::val target, ObserveOptions const& options) const;
55
62 void unobserve(Nui::val target) const;
63
64 private:
65 std::function<void(std::vector<ResizeObserverEntry> const&, ResizeObserver const&)> callback_;
66 };
67}
Common base class for classes that are just wrapping around val into js world.
Definition val_wrapper.hpp:11
A resize observer class, used for observing resize events on elements.
Definition resize_observer.hpp:16
void observe(Nui::val target) const
The observe() method of the ResizeObserver interface starts observing the specified Element or SVGEle...
Definition resize_observer.cpp:35
void unobserve(Nui::val target) const
The unobserve() method of the ResizeObserver interface ends the observing of a specified Element or S...
Definition resize_observer.cpp:45
void disconnect() const
The disconnect() method of the ResizeObserver interface unobserves all observed Element or SVGElement...
Definition resize_observer.cpp:31
Definition abort_controller.hpp:8
emscripten::val val
Definition val.hpp:5
Definition resize_observer.hpp:35
std::string box
Definition resize_observer.hpp:36