Abortable

Abortable

Host-side abort-enabled types implement this interface, which gains the assignAborted method.

Inheritors

Properties

Link copied to clipboard
abstract val aborted: Boolean

Read-only property indicating whether the signal has been aborted; from MDN:

Link copied to clipboard
abstract val reason: Any?

Read-only property indicating the reason the operation was aborted; from MDN:

Functions

Link copied to clipboard
abstract fun addEventListener(type: String, listener: EventListener)
abstract fun addEventListener(type: String, options: AddEventListenerOptions, listener: EventListener)
abstract fun addEventListener(type: String, listener: Value, options: Value?)

Adds a new handler for the type event. Any given listener is added only once per type and per capture option value.

Link copied to clipboard
abstract fun assignAborted(reason: Any? = null)

Mark this abort-able object as aborted.

Link copied to clipboard
abstract fun dispatchEvent(event: Event): Boolean

Dispatches the event to the list of handlers for Event.type.

Link copied to clipboard
abstract fun removeEventListener(type: String, listener: EventListener)
abstract fun removeEventListener(type: String, listener: Value)
abstract fun removeEventListener(type: String, listener: EventListener, options: RemoveEventListenerOptions)
abstract fun removeEventListener(type: String, listener: EventListener, options: Value)
abstract fun removeEventListener(type: String, listener: Value, options: Value)

Removes the listener from the list of handlers for event type.

Link copied to clipboard
abstract fun throwIfAborted()

Throws the AbortSignal's reason for aborting, if aborted; from MDN: