Skip to content

Create handlers for keys, events, timers and tasks using their constructors, not through the global Phoenix-object #109

@kasper

Description

@kasper

Create handlers for keys, events, timers and tasks using their constructors, not through the global Phoenix-object. This should finally separate the distinction between managed and unmanaged handlers and make it obvious why you need to keep a reference.

For this, for the context of the JavaScript scope, shorten the names of handlers as follows:

  1. KeyHandler -> Key
  2. EventHandler -> Event
  3. TimerHandler -> Timer
  4. TaskHandler -> Task

This will also merge the API for managed and unmanaged handlers. To create a new key handler, you will then then use the following.

var handler = new Key('q', [ 'ctrl', 'shift' ], function () {});

To use the managed API, you will use the following.

Key.on('q', [ 'ctrl', 'shift' ], function () {});

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions