MCPcopy
hub / github.com/methodofaction/Method-Draw / addEvent

Function addEvent

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

Source from the content-addressed store, hash-verified

904}
905
906function addEvent(elem, type, fn) {
907 if ( elem.addEventListener ) {
908 elem.addEventListener( type, fn, false );
909 } else if ( elem.attachEvent ) {
910 elem.attachEvent( "on" + type, fn );
911 } else {
912 fn();
913 }
914}
915
916function id(name) {
917 return !!(typeof document !== "undefined" && document && document.getElementById) &&

Callers 1

qunit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected