I'm manipulating the transform property like so in my webpage in order to achieve a scrolling effect:
element.style.webkitTransform = "translate(0px, -"+scrollY+"px)";
snapShotPage();
I know that in most browsers (including Webkit from my experience) wait until script execution is over to make any visual changes, however in my case, I need snapShotPage()
to run after redraw/repaint has occurred, in order to get an accurate snapshot. Is there any way to do this?
I noticed that using scrollTop
causes this behavior, however it's not an option in my case. Is there a solution that avoids using setTimeout
?