wilsonpage / fastdom

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

Added optional argument to pass when binding #87

Closed dhenson02 closed 8 years ago

dhenson02 commented 8 years ago

This prevents the closure loop issue when the value has changed from what it originally was and all uncalled tasks will have the same value.

Added tests this time :+1:

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 98.45% when pulling 4e4b3e414257ba5b8d9e0d3973955ea112a712ba on dhenson02:master into e1bcd99ff100ef03793009a320b8c02a65a907c0 on wilsonpage:master.

wilsonpage commented 8 years ago

Thanks for your PR 😄

Although, I'm a little confused why you cannot just do:

fastdom.measure(myTask.bind(this, boundArg);

I would favour that approach over adding additional features.

dhenson02 commented 8 years ago

understandable. thanks anyway