W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [CSSOM View] Extensions to Element.scrollLeft and Element.scrollTop are not valid WebIDL

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 30 Jul 2014 16:45:32 -0500
Message-ID: <CAAWBYDCTtH5A1VFqWBkzSjF6bMYtGc=nkii13exyaFvSu7ed0A@mail.gmail.com>
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.

Received on Wednesday, 30 July 2014 21:46:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC