wilsonpage / fastdom

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

proposed fix for #12 #13

Closed th507 closed 11 years ago

th507 commented 11 years ago

proposed fix for #12

wilsonpage commented 11 years ago

Nice work!

Although, for consistency with the other APIs, I'd prefer:

fastdom.defer(<callback>, <frames>, <context>);
th507 commented 11 years ago

I agree splitting context as a separate parameter is a plus for consistency, but separating callback and context with another irrelevant parameter is perhaps not entirely coherent. If compatibility is not an issue, I would suggest

fastdom.defer(<frames>, <callback>, <context>);

However, if maintain compatibility is a priority for this project, I could make changes according to your suggestion.

wilsonpage commented 11 years ago

I completely agree, let's go with your suggestion :) On 25 Sep 2013 03:27, "Jingwei Liu" notifications@github.com wrote:

I agree splitting context as a separate parameter is a plus for consistency, but separating callback and context with another irrelevant parameter is perhaps not entirely coherent. If compatibility is not an issue, I would suggest

fastdom.defer(, , );

However, if maintain compatibility is a priority for this project, I could make changes according to your suggestion.

— Reply to this email directly or view it on GitHubhttps://github.com/wilsonpage/fastdom/pull/13#issuecomment-25058196 .