Skip to content

Feature request: Return callback function on methods. #13

@bozdevs

Description

@bozdevs

Feature request: Return callback function on methods.

If we turn off a listener, it requires type, selector, callback right? In this case, we write same function again and again.

For example:

events.on("click", "document", function(){
   return "Hello!";
});

...

events.off("click", "document", function(){
   return "Hello!";
});

If the on() method give us callback function, we use it again and again.

Example:

callback = events.on("click", "document", function(){
   return "Hello!";
});

...

events.off("click", "document", callback);

In this case, you just add return callback; end of methods.

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