wilsonpage / fastdom

Eliminates layout thrashing by batching DOM measurement and mutation tasks
6.85k stars 240 forks source link

Accept context for deferred jobs #14

Closed th507 closed 11 years ago

th507 commented 11 years ago

Proposed fix for #12

In the original code, if I call defer with a negative frame, like fastdom.defer(-1, fn), the inner wrapper function will run infinitely. It's a bit difficult to write a proper test case for this scenario, but I'm sure you get the picture.

wilsonpage commented 11 years ago

Thank you very much for this =]