Skip to content

AbortSignal.AddOnAbortEventListener method should take EventListener as argument and return Task #13

@KristofferStrube

Description

@KristofferStrube

Currently, this is the signature of AddOnAbortEventListener:

public async Task<EventListener<Event>> AddOnAbortEventListener(
    Func<Event, Task> callback,
    AddEventListenerOptions? options = null
)

But we want to standardize our event methods to only take event listeners directly to give the users of this library and dependant libraries more control over when they want to add new event listeners.

So instead we should have the following new signature for the method and obsolete the old method implementation with the argument that this overload gives better options for controlling memory allocation.

public async Task AddOnAbortEventListener(
    EventListener<Event> callback,
    AddEventListenerOptions? options = null
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions