Nui
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Nui::WebApi::AbortController Class Reference

#include <abort_controller.hpp>

Inheritance diagram for Nui::WebApi::AbortController:
Inheritance graph
[legend]
Collaboration diagram for Nui::WebApi::AbortController:
Collaboration graph
[legend]

Public Member Functions

 AbortController ()
 
 AbortController (Nui::val val)
 
AbortSignal signal ()
 
void abort () const
 Aborts an asynchronous operation before it has completed.
 
void abort (Nui::val reason) const
 Aborts an asynchronous operation before it has completed.
 
- Public Member Functions inherited from Nui::ValWrapper
 ValWrapper (Nui::val valObject)
 
virtual ~ValWrapper ()=default
 
 ValWrapper (ValWrapper const &)=default
 
 ValWrapper (ValWrapper &&) noexcept=default
 
ValWrapperoperator= (ValWrapper const &)=default
 
ValWrapperoperator= (ValWrapper &&) noexcept=default
 
Nui::val const & val () const &noexcept
 
Nui::val val () &&noexcept
 
 operator Nui::val const & () const &noexcept
 
 operator Nui::val () &&noexcept
 

Additional Inherited Members

- Protected Attributes inherited from Nui::ValWrapper
Nui::val val_
 

Detailed Description

See also
https://developer.mozilla.org/en-US/docs/Web/API/AbortController

Constructor & Destructor Documentation

◆ AbortController() [1/2]

Nui::WebApi::AbortController::AbortController ( )

◆ AbortController() [2/2]

Nui::WebApi::AbortController::AbortController ( Nui::val  val)
explicit

Member Function Documentation

◆ abort() [1/2]

void Nui::WebApi::AbortController::abort ( ) const

Aborts an asynchronous operation before it has completed.

This is able to abort fetch requests, consumption of any response bodies, and streams.

◆ abort() [2/2]

void Nui::WebApi::AbortController::abort ( Nui::val  reason) const

Aborts an asynchronous operation before it has completed.

This is able to abort fetch requests, consumption of any response bodies, and streams.

Parameters
reasonThe reason why the operation was aborted, which can be any JavaScript value. If not specified, the reason is set to "AbortError" DOMException.

◆ signal()

AbortSignal Nui::WebApi::AbortController::signal ( )

The documentation for this class was generated from the following files: