@bodil/core - v0.4.3
    Preparing search index...

    Namespace disposable

    Tools for working with Disposables and things that should have been Disposable.

    Classes

    DisposableAbortController

    An implementation of AbortController which also implements Disposable.

    DisposableContext

    A reentrant version of DisposableStack.

    Type Aliases

    Disposifiable

    Type for something that can be turned into a Disposable.

    Functions

    abortController

    Create an AbortController which also implements Disposable.

    animationFrame

    Call window.requestAnimationFrame with the provided callback and return a Disposable which will cancel the request when disposed.

    AutoDisposable

    A class mixin which provides a Disposable implementation.

    eventListener

    Attach an event listener to an EventTarget and return a Disposable which will remove the listener when disposed.

    idleCallback
    interval

    Call setInterval with the provided callback and return a Disposable which will cancel the interval when disposed.

    isDisposable

    Test whether something implements Disposable.

    timeout

    Call setTimeout with the provided callback and return a Disposable which will cancel the timeout when disposed.

    toDisposable

    Construct a new Disposable out of any Disposifiable.