Skip to content

Support .callHookOnce #105

@pi0

Description

@pi0

Describe the feature

Usually, there are some hooks that are to be called only once.

In the current API, it is delegated to hook consumers to use hookOnce on them; if they don't and use hook insteam, small callbacks might remain in memory.

A new .callHookOnce API can make sure it from provider-side and automatically discard all listeners after.

Second idea: We could also warn if a hook register attempt after callOnce that it won't be called and likely a late register issue

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions