wilsonpage / fastdom

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

fastdom-strict does not support context #108

Closed Melatonin64 closed 7 years ago

Melatonin64 commented 7 years ago

With fastdom-strict, 2nd argument to measure/mutate is ignored (the callback will be invoked with an undefined context).

wilsonpage commented 7 years ago

Thanks. You're right, the actual given task() is not being called with the given ctx.

https://github.com/wilsonpage/fastdom/blob/master/src/fastdom-strict.js#L23-L26

This should be an easy patch, but I don't have the time to look into it at the moment, happy to accept PRs.

Melatonin64 commented 7 years ago

Ok, I'll try to get to it over the weekend and send a PR.