Share via


AbortSignalLike interface

允許在引發「中止」事件時中止要求。 與瀏覽器內建 AbortSignal 和通用 polyfills 相容。

屬性

aborted

指出訊號是否已中止。

方法

addEventListener("abort", (this: AbortSignalLike, ev: any) => any, any)

新增「中止」事件接聽程式,僅支援「中止」事件。

removeEventListener("abort", (this: AbortSignalLike, ev: any) => any, any)

移除 「中止」事件接聽程式,僅支援「中止」事件。

屬性詳細資料

aborted

指出訊號是否已中止。

aborted: boolean

屬性值

boolean

方法詳細資料

addEventListener("abort", (this: AbortSignalLike, ev: any) => any, any)

新增「中止」事件接聽程式,僅支援「中止」事件。

function addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any)

參數

type

"abort"

listener

(this: AbortSignalLike, ev: any) => any

options

any

removeEventListener("abort", (this: AbortSignalLike, ev: any) => any, any)

移除 「中止」事件接聽程式,僅支援「中止」事件。

function removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any)

參數

type

"abort"

listener

(this: AbortSignalLike, ev: any) => any

options

any