MCPcopy Create free account
hub / github.com/sql-js/sql.js / addEvent

Function addEvent

documentation/javascript/application.js:10363–10368  ·  view source on GitHub ↗
(object, event, method)

Source from the content-addressed store, hash-verified

10361
10362 // cross-browser events
10363 function addEvent(object, event, method) {
10364 if (object.addEventListener)
10365 object.addEventListener(event, method, false);
10366 else if(object.attachEvent)
10367 object.attachEvent('on'+event, function(){ method(window.event) });
10368 };
10369
10370 // set the handlers globally on document
10371 addEvent(document, 'keydown', function(event) { dispatch(event, _scope) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48

Callers 1

application.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…