Nui
Loading...
Searching...
No Matches
abort_signal.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <chrono>
6
7namespace Nui::WebApi
8{
12 class AbortSignal : public ValWrapper
13 {
14 public:
15 explicit AbortSignal(Nui::val val);
16
21 bool aborted() const;
22
26 Nui::val reason() const;
27
32 void abort() const;
33
41 void abort(Nui::val reason) const;
42
49 void timeout(std::chrono::milliseconds time) const;
50 };
51}
Common base class for classes that are just wrapping around val into js world.
Definition val_wrapper.hpp:11
Definition abort_signal.hpp:13
Nui::val reason() const
A JavaScript value providing the abort reason, once the signal has aborted.
Definition abort_signal.cpp:12
void timeout(std::chrono::milliseconds time) const
The AbortSignal.timeout() static method returns an AbortSignal that will automatically abort after a ...
Definition abort_signal.cpp:24
bool aborted() const
A Boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true...
Definition abort_signal.cpp:8
void abort() const
The AbortSignal.abort() static method returns an AbortSignal that is already set as aborted (and whic...
Definition abort_signal.cpp:16
Definition abort_controller.hpp:8
emscripten::val val
Definition val.hpp:5