MCPcopy
hub / github.com/dataarts/dat.gui / addEvent

Function addEvent

tests/qunit.js:1013–1021  ·  view source on GitHub ↗
(elem, type, fn)

Source from the content-addressed store, hash-verified

1011}
1012
1013function addEvent(elem, type, fn) {
1014 if ( elem.addEventListener ) {
1015 elem.addEventListener( type, fn, false );
1016 } else if ( elem.attachEvent ) {
1017 elem.attachEvent( "on" + type, fn );
1018 } else {
1019 fn();
1020 }
1021}
1022
1023function id(name) {
1024 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…