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

Function onScroll

src/ResizeSensor.js:273–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271 };
272
273 var onScroll = function() {
274 size = getElementSize(element);
275 dirty = size.width !== lastWidth || size.height !== lastHeight;
276
277 if (dirty && !rafId) {
278 rafId = requestAnimationFrame(onResized);
279 }
280
281 reset();
282 };
283
284 var addEvent = function(el, name, cb) {
285 if (el.attachEvent) {

Callers

nothing calls this directly

Calls 2

resetFunction · 0.85
getElementSizeFunction · 0.70

Tested by

no test coverage detected