MCPcopy
hub / github.com/fabien-d/alertify.js / addEvent

Function addEvent

test/qunit/qunit.js:1308–1316  ·  view source on GitHub ↗
( elem, type, fn )

Source from the content-addressed store, hash-verified

1306}
1307
1308function addEvent( elem, type, fn ) {
1309 if ( elem.addEventListener ) {
1310 elem.addEventListener( type, fn, false );
1311 } else if ( elem.attachEvent ) {
1312 elem.attachEvent( "on" + type, fn );
1313 } else {
1314 fn();
1315 }
1316}
1317
1318function id( name ) {
1319 return !!( typeof document !== "undefined" && document && document.getElementById ) &&

Callers 1

qunit.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…