Skip to content

Callbacks.has() documentation should describe the signature with no parameters #549

Closed
@terrabruder

Description

@terrabruder

Callbacks.has() (without parameters) returns true if the object has listeners and false otherwise. There are a few reasons that this behavior should be explicitly documented:

  • The general knowledge of the presence of listeners as frequently useful (in the creation of default behavior, for example)
  • This signature is far more performant than the search for a specific listener
  • State knowledge is more consistent with loose coupling than specific knowledge

Please add documentation for this signature.

Examples might include a demonstration of this behavior before and after the use of the Callbacks.add and Callbacks.remove methods.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions