Why is element.scrollLeft so slow in IE?
I have been timing how long it takes to say
div = document.getElementById('mydiv');
div.scrollLeft;
where mydiv has a set width and overflow-x: scroll.
In chrome and FF, this object access (its not a fn call right, why does it have to do any work?) is essentially free (never more than a couple ms). In IE though (6,7,8) it is on the order of a开发者_如何学编程 couple seconds if the div is wide enough. What can I do about this?
精彩评论