/test_time_for_scroll_into_view

try test excution time to scrollIntoView smooth behavior using repeated function

Primary LanguageHTML

try to test time for scrollIntoView method using repeated action method.

const px1000 = result.reduce( (a,b)=>{return a+b;}, 0 )/result.length;
undefined
const precentage = (px1000 / 1000); // precentage to calcuate based on scroll pixel for example scroll 127.32 pixel = (precentage * 127.32)
undefined
const px10000 = 10000 * precentage;
undefined
px10000
3160.125413293809 // 10000 pixel time

final result for scroll smooth 1000px was: 316.0125413293809 milliseconds