MCPcopy Index your code
hub / github.com/CodeboxIDE/codebox / _addEvent

Function _addEvent

client/vendors/mousetrap.js:215–222  ·  view source on GitHub ↗

* cross browser add event method * * @param {Element|HTMLDocument} object * @param {string} type * @param {Function} callback * @returns void

(object, type, callback)

Source from the content-addressed store, hash-verified

213 * @returns void
214 */
215 function _addEvent(object, type, callback) {
216 if (object.addEventListener) {
217 object.addEventListener(type, callback, false);
218 return;
219 }
220
221 object.attachEvent('on' + type, callback);
222 }
223
224 /**
225 * takes the event and returns the key character

Callers 1

mousetrap.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected