* actually calls the callback function * * if your callback function returns false this will use the jquery * convention - prevent default and stop propogation on the event * * @param {Function} callback * @param {Event} e * @returns void
(callback, e, combo, sequence)
| 443 | * @returns void |
| 444 | */ |
| 445 | function _fireCallback(callback, e, combo, sequence) { |
| 446 | |
| 447 | // if this event should not happen stop here |
| 448 | if (Mousetrap.stopCallback(e, e.target || e.srcElement, combo, sequence)) { |
| 449 | return; |
| 450 | } |
| 451 | |
| 452 | if (callback(e, combo) === false) { |
| 453 | _preventDefault(e); |
| 454 | _stopPropagation(e); |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | /** |
| 459 | * handles a character key event |
no test coverage detected