MCPcopy
hub / github.com/marcj/css-element-queries / addEvent

Function addEvent

src/ResizeSensor.js:284–290  ·  view source on GitHub ↗
(el, name, cb)

Source from the content-addressed store, hash-verified

282 };
283
284 var addEvent = function(el, name, cb) {
285 if (el.attachEvent) {
286 el.attachEvent('on' + name, cb);
287 } else {
288 el.addEventListener(name, cb);
289 }
290 };
291
292 addEvent(expand, 'scroll', onScroll);
293 addEvent(shrink, 'scroll', onScroll);

Callers 1

attachResizeEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected