- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 30 Jul 2014 16:45:32 -0500
- To: Kip Gilbert <kgilbert@mozilla.com>
- Cc: www-style@w3c.org
On Tue, Jul 22, 2014 at 7:39 PM, Kip Gilbert <kgilbert@mozilla.com> wrote: > I would like to suggest that the scrollTop and scrollLeft attributes > remain as double data type only, and that a separate method be added > to the Element interface for scrolling with ScrollOptions: > > void scrollTo(double x, double y, optional ScrollOptions options); > > Calling this method would be equivalent to setting both the scrollTop > and scrollLeft attributes while simultanously specifying the > ScrollOptions. I don't think this signature is quite right. It requires you to set both x and y, while setting the attributes lets you do only one or the other if you want. I'd prefer subclassing ScrollOptions into containing top/left members, and having scrollTo just take a ScrollOptions object. Give top/left a default of null, and have that mean "no scrolling in this axis". Otherwise, I'm fine with this. ~TJ
Received on Wednesday, 30 July 2014 21:46:18 UTC