addTWlisteners = (listeners, widget, context) => {

  for (let id in listeners) {
    widget.addEventListener(id, listeners[id].bind(context));
  }

}
Register listeners to widget using a hashmap.

@param {Hashmap<Key, Function>} listeners - The listeners to attach.
@param {Widget} widget - the widget to attach the listeners to.
@param {Object} context - The context to bind the listeners to.