MCPcopy
hub / github.com/CodeboxIDE/codebox / _fireCallback

Function _fireCallback

client/vendors/mousetrap.js:445–456  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 2

_handleKeyFunction · 0.85
_callbackAndResetFunction · 0.85

Calls 3

_preventDefaultFunction · 0.85
_stopPropagationFunction · 0.85
callbackFunction · 0.70

Tested by

no test coverage detected